Using a current picture as a reference for video coding

ABSTRACT

An example method for encoding or decoding video data includes storing, by a video coder and in a reference picture buffer, a version of a current picture of the video data, including the current picture in a reference picture list (RPL) used to predict the current picture, and coding, by the video coder and based on the RPL, a block of video data in the current picture based on a predictor block of video data included in the version of the current picture stored in the reference picture buffer.

This application is a continuation of U.S. patent application Ser. No.14/663,155 filed Mar. 19, 2015 which claims the benefit of U.S.Provisional Application No. 61/969,022, filed Mar. 21, 2014 and U.S.Provisional Application No. 62/000,437, filed May 19, 2014, the entirecontents of each of which is incorporated by reference herein in itsentirety.

TECHNICAL FIELD

This disclosure relates to video coding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the High Efficiency Video Coding (HEVC) standardpresently under development, and extensions of such standards. The videodevices may transmit, receive, encode, decode, and/or store digitalvideo information more efficiently by implementing such videocompression techniques.

Video compression techniques perform spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video picture or a portion of a video picture) maybe partitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized.

SUMMARY

In general, this disclosure describes techniques for performingIntra-prediction for video coding. More particularly, this disclosuredescribes example techniques for using a current picture as a referencepicture when coding one or more blocks of the current picture. Forinstance, a current picture may be used as a reference picture whencoding one or more blocks of the current picture using Intra BlockCopying (Intra BC).

In one example, a method of encoding or decoding video data includesstoring, by a video coder and in a reference picture buffer, a versionof a current picture of the video data; inserting an indication of thecurrent picture in a reference picture list (RPL) used during predictionof blocks of the current picture; and coding, by the video coder andbased on the RPL, a first block of video data in the current picturebased on a predictor block of video data included in the version of thecurrent picture stored in the reference picture buffer. In someexamples, the predictor block may alternatively be referred to as aprediction block.

In another example, a device for encoding or decoding video dataincludes a reference picture buffer configured to store one or morepictures of the video data, and one or more processors. In this example,the one or more processors are configured to: store, in a referencepicture buffer, a version of a current picture of the video data; insertan indication of the current picture in a reference picture list (RPL)used during prediction of blocks of the current picture; and coding, bythe video coder and based on the RPL, a first block of video data in thecurrent picture based on a predictor block of video data included in theversion of the current picture stored in the reference picture buffer.

In another example, a device for encoding or decoding video dataincludes means for storing, in a reference picture buffer, a version ofa current picture of the video data; means for inserting an indicationof the current picture in a reference picture list (RPL) used duringprediction of blocks of the current picture; and means for coding, basedon the RPL, a first block of video data in the current picture based ona predictor block of video data included in the version of the currentpicture stored in the reference picture buffer.

In another example, a computer-readable storage medium storesinstructions that, when executed, cause one or more processors of avideo coder to: store, in a reference picture buffer, a version of acurrent picture of the video data; insert an indication of the currentpicture in a reference picture list (RPL) used during prediction ofblocks of the current picture; and code, based on the RPL, a first blockof video data in the current picture based on a predictor block of videodata included in the version of the current picture stored in thereference picture buffer.

The details of one or more aspects of the disclosure are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the techniques described in this disclosurewill be apparent from the description and drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may implement the techniques of this disclosure.

FIG. 2 is a conceptual diagram illustrating an example video sequence ofpictures, in accordance with one or more techniques of this disclosure.

FIG. 3 is a block diagram illustrating an example of a video encoderthat may use techniques for intra block copy described in thisdisclosure.

FIG. 4 illustrates an example of angular intra-prediction modes that maybe used in accordance with one or more techniques of this disclosure

FIG. 5 is a block diagram illustrating an example of video decoder thatmay implement techniques described in this disclosure.

FIG. 6 is a diagram illustrating an example of an intra block copyingprocess, in accordance with one or more techniques of this disclosure.

FIG. 7 is a flow diagram illustrating example operations of a videoencoder to encode a block of video data of a picture based on apredictor block included in the same picture, in accordance with one ormore techniques of the present disclosure.

FIG. 8 is a flow diagram illustrating example operations of a videodecoder to decode a block of video data of a picture based on apredictor block included in the same picture, in accordance with one ormore techniques of the present disclosure.

DETAILED DESCRIPTION

A video sequence is generally represented as a sequence of pictures.Typically, block-based coding techniques are used to code each of theindividual pictures. That is, each picture is divided into blocks, andeach of the blocks is individually coded. Coding a block of video datagenerally involves forming predicted values for pixels in the block andcoding residual values. The prediction values are formed using pixelsamples in one or more predictive blocks. The residual values representthe differences between the pixels of the original block and thepredicted pixel values. Specifically, the original block of video dataincludes an array of pixel values, and the predicted block includes anarray of predicted pixel values. The residual values represent topixel-by-pixel differences between the pixel values of the originalblock and the predicted pixel values.

Prediction techniques for a block of video data are generallycategorized as intra-prediction and inter-prediction. Intra-prediction,or spatial prediction, does not include prediction from any referencepicture, instead the block is predicted from pixel values ofneighboring, previously coded blocks. Inter-prediction, or temporalprediction, generally involves predicting the block from pixel values ofone or more previously coded reference pictures (e.g., frames or slices)selected from one or more reference picture lists (RPLs). A video codermay include one or more reference picture buffers configured to storethe pictures included in the RPLs.

Many applications, such as remote desktop, remote gaming, wirelessdisplays, automotive infotainment, cloud computing, etc., are becomingroutine in daily lives. Video contents in these applications are usuallycombinations of natural content, text, artificial graphics, etc. In textand artificial graphics region, repeated patterns (such as characters,icons, symbols, etc.) often exist. Intra Block Copying (Intra BC) is atechnique which may enable a video coder to remove such redundancy andimprove intra-picture coding efficiency. In some instances, Intra BCalternatively may be referred to as Intra motion compensation (MC).

According to some Intra BC techniques, video coders may use blocks ofpreviously coded video data, within the same picture as the currentblock of video data, that are either directly above or directly in linehorizontally with a current block (to be coded) of video data in thesame picture for prediction of the current block. In other words, if apicture of video data is imposed on a 2-D grid, each block of video datawould occupy a unique range of x-values and y-values. Accordingly, somevideo coders may predict a current block of video data based on blocksof previously coded video data that share only the same set of x-values(i.e., vertically in-line with the current block) or the same set ofy-values (i.e., horizontally in-line with the current block).

Other Intra BC techniques, are described in Pang et al., “Non-RCE3:Intra Motion Compensation with 2-D MVs,” Document: JCTVC-N0256, JCT-VCof ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14^(th) Meeting:Vienna, AT 25 Jul.-2 Aug. 2013 (hereinafter “JCTVC-N0256”). At theJCT-VC meeting in Vienna (July 2013), Intra BC was adopted in the HighEfficiency Video Coding (HEVC) Range Extension standard. According toJCTVC-N0256, a video coder may determine a two-dimensional motion vectorwhich identifies a prediction block within the same picture as thecurrent block. In some examples, the motion vector may also be referredto as a block vector, an offset vector, or a displacement vector. In anycase, the two-dimensional motion vector has a horizontal displacementcomponent and a vertical displacement component, each of which may bezero or non-zero. The horizontal displacement component represents ahorizontal displacement between the predictive block of video data, orprediction block, and a current block of video data and the verticaldisplacement component represents a vertical displacement between theprediction block of video data and the current block of video data. ForIntra BC, the pixels of the predictive block may be used as predictivesamples for corresponding pixels in the block (i.e., the current block)that is being coded. The video coder may additionally determine aresidual block of video data based on the current block of video dataand the prediction block, and code the two-dimensional motion vector andthe residual block of video data.

In some examples, Intra BC may be an efficient coding tool, especiallyfor screen content coding. For instance, in some examples, coding blocksusing Intra BC may result in a smaller bitstream that coding blocksusing inter or intra coding. As discussed above, Intra BC is aninter-alike coding tool (meaning that pixel values for a picture arepredicted from other pixel values in the picture). However, in someexamples, it may be difficult to integrate Intra BC into conventionalintra pictures due to one or more constraints applied to Intra BC, whichmay not preferred in practical design. Some example constraints include,but are not limited to, that the predictor block be within the sameslice or tile as the current block to be coded, that the predictor blocknot overlap the current block to be coded, that all pixels in thepredictor block be reconstructed, that the predictor block be within acertain region (e.g., due to considerations relating to parallelizationimplementation as described in Rapaka et al., “On parallel processingcapability of intra block copy,” Document: JCTVC-50220, JCT-VC of ITU-TSG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 19th Meeting: Strasbourg, FR17-24 Oct. 2014), and, when constrained intra prediction is enabled,that the predictor block does not include any pixel coded using theconventional inter mode. Additionally, in some examples, the hardwarearchitecture for conventional intra and inter frames may not be reusedfor Intra BC without modification (e.g., due to Intra BC resulting inblock copy inside a picture). As such, it may be desirable to enable avideo coder to gain the efficiencies provided by Intra BC whilemaintaining some or all of the constraints currently applied to IntraBC, and without (significant) modification to the hardware architecture.

In accordance with one or more techniques of this disclosure, as opposedto predicting a block of a current picture based on samples in thecurrent picture using conventional intra prediction techniques, a videocoder may perform Intra BC to predict a block in a current picture basedon samples in the current picture using techniques similar toconventional inter prediction. For instance, a video coder may includethe current picture in a reference picture list (RPL) used to predictthe current picture, store a version of the current picture in areference picture buffer, and code the block of video data in thecurrent picture based on a predictor block of video data included in theversion of the current picture stored in the reference picture buffer.In this way, a video coder may gain the efficiencies provided by IntraBC while maintaining some or all of the constraints currently applied toIntra BC. Also in this way, a video coder may reuse the hardwarearchitecture for conventional intra and inter frames for Intra BCwithout significant modification.

This disclosure describes example techniques related to utilizing acurrent picture as a reference picture when predicting portions of thecurrent picture. To assist with understanding, the example techniquesare described with respect to range extensions (RExt) to the HighEfficiency Video Coding (HEVC) video coding standard, including thesupport of possibly high bit depth, (more than 8 bit), high chromasampling format, including 4:4:4 and 4:2:2. The techniques may alsoapplicable for screen content coding. It should be understood that thetechniques are not limited to range extensions or screen content coding,and may be applicable generally to video coding techniques includingstandards based or non-standards based video coding. Also, thetechniques described in this disclosure may become part of standardsdeveloped in the future. In other words, the techniques described inthis disclosure may be applicable to previously developed video codingstandards, video coding standards currently under development, andforthcoming video coding standards.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may implement the techniques of this disclosure.As shown in FIG. 1, system 10 includes a source device 12 that providesencoded video data to be decoded at a later time by a destination device14. In particular, source device 12 provides the video data todestination device 14 via a computer-readable medium 16. Source device12 and destination device 14 may comprise any of a wide range ofdevices, including desktop computers, notebook (i.e., laptop) computers,tablet computers, set-top boxes, telephone handsets such as so-called“smart” phones, so-called “smart” pads, televisions, cameras, displaydevices, digital media players, video gaming consoles, video streamingdevice, or the like. In some cases, source device 12 and destinationdevice 14 may be equipped for wireless communication.

Destination device 14 may receive the encoded video data to be decodedvia computer-readable medium 16. Computer-readable medium 16 maycomprise any type of medium or device capable of moving the encodedvideo data from source device 12 to destination device 14. In oneexample, computer-readable medium 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wirelesscommunication protocol, and transmitted to destination device 14. Thecommunication medium may comprise any wireless or wired communicationmedium, such as a radio frequency (RF) spectrum or one or more physicaltransmission lines. The communication medium may form part of apacket-based network, such as a local area network, a wide-area network,or a global network such as the Internet. The communication medium mayinclude routers, switches, base stations, or any other equipment thatmay be useful to facilitate communication from source device 12 todestination device 14.

In some examples, encoded data may be output from output interface 22 ofsource device 12 to a storage device 32. Similarly, encoded data may beaccessed from the storage device 32 by input interface 28 of destinationdevice 14. The storage device 32 may include any of a variety ofdistributed or locally accessed data storage media such as a hard drive,Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatilememory, or any other suitable digital storage media for storing encodedvideo data. In a further example, the storage device 32 may correspondto a file server or another intermediate storage device that may storethe encoded video generated by source device 12.

Destination device 14 may access stored video data from the storagedevice 32 via streaming or download. The file server may be any type ofserver capable of storing encoded video data and transmitting thatencoded video data to the destination device 14. Example file serversinclude a web server (e.g., for a website), an FTP server, networkattached storage (NAS) devices, or a local disk drive. Destinationdevice 14 may access the encoded video data through any standard dataconnection, including an Internet connection. This may include awireless channel (e.g., a Wi-Fi connection), a wired connection (e.g.,DSL, cable modem, etc.), or a combination of both that is suitable foraccessing encoded video data stored on a file server. The transmissionof encoded video data from the storage device may be a streamingtransmission, a download transmission, or a combination thereof.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, Internet streamingvideo transmissions, such as dynamic adaptive streaming over HTTP(DASH), digital video that is encoded onto a data storage medium,decoding of digital video stored on a data storage medium, or otherapplications. In some examples, system 10 may be configured to supportone-way or two-way video transmission to support applications such asvideo streaming, video playback, video broadcasting, and/or videotelephony.

In the example of FIG. 1, source device 12 includes video source 18,video encoder 20, and output interface 22. Destination device 14includes input interface 28, video decoder 30, and display device 31. Inaccordance with this disclosure, video encoder 20 of source device 12may be configured to apply the techniques for performing transformationin video coding. In other examples, a source device and a destinationdevice may include other components or arrangements. For example, sourcedevice 12 may receive video data from an external video source 18, suchas an external camera. Likewise, destination device 14 may interfacewith an external display device, rather than including an integrateddisplay device.

The illustrated system 10 of FIG. 1 is merely one example. Techniquesfor improved intra block copy signaling in video coding may be performedby any digital video encoding and/or decoding device. Although generallythe techniques of this disclosure are performed by a video encoding ordecoding device, the techniques may also be performed by a video codec.Moreover, the techniques of this disclosure may also be performed by avideo preprocessor. Source device 12 and destination device 14 aremerely examples of such coding devices in which source device 12generates coded video data for transmission to destination device 14. Insome examples, devices 12, 14 may operate in a substantially symmetricalmanner such that each of devices 12, 14 include video encoding anddecoding components. Hence, system 10 may support one-way or two-wayvideo transmission between video devices 12, 14, e.g., for videostreaming, video playback, video broadcasting, or video telephony.

Video source 18 of source device 12 may include a video capture device,such as a video camera, a video archive containing previously capturedvideo, and/or a video feed interface to receive video from a videocontent provider. As a further alternative, video source 18 may generatecomputer graphics-based data as the source video, or a combination oflive video, archived video, and computer-generated video. In some cases,if video source 18 is a video camera, source device 12 and destinationdevice 14 may form so-called camera phones or video phones. As mentionedabove, however, the techniques described in this disclosure may beapplicable to video coding in general, and may be applied to wirelessand/or wired applications. In each case, the captured, pre-captured, orcomputer-generated video may be encoded by video encoder 20. The encodedvideo information may then be output by output interface 22 onto acomputer-readable medium 16.

Computer-readable medium 16 may include transient media, such as awireless broadcast or wired network transmission, or storage media (thatis, non-transitory storage media), such as a hard disk, flash drive,compact disc, digital video disc, Blu-ray disc, or othercomputer-readable media. In some examples, a network server (not shown)may receive encoded video data from source device 12 and provide theencoded video data to destination device 14, e.g., via networktransmission. Similarly, a computing device of a medium productionfacility, such as a disc stamping facility, may receive encoded videodata from source device 12 and produce a disc containing the encodedvideo data. Therefore, computer-readable medium 16 may be understood toinclude one or more computer-readable media of various forms, in variousexamples.

Input interface 28 of destination device 14 receives information fromcomputer-readable medium 16 or storage device 32. The information ofcomputer-readable medium 16 or storage device 32 may include syntaxinformation defined by video encoder 20, which is also used by videodecoder 30, that includes syntax elements that describe characteristicsand/or processing of blocks and other coded units, e.g., GOPs. Displaydevice 31 displays the decoded video data to a user, and may compriseany of a variety of display devices such as a cathode ray tube (CRT), aliquid crystal display (LCD), a plasma display, an organic lightemitting diode (OLED) display, or another type of display device.

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder or decoder circuitry, as applicable, suchas one or more microprocessors, digital signal processors (DSPs),application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), discrete logic circuitry, software, hardware,firmware or any combinations thereof. When the techniques areimplemented partially in software, a device may store instructions forthe software in a suitable, non-transitory computer-readable medium andexecute the instructions in hardware using one or more processors toperform the techniques of this disclosure. Each of video encoder 20 andvideo decoder 30 may be included in one or more encoders or decoders,either of which may be integrated as part of a combined videoencoder/decoder (codec). A device including video encoder 20 and/orvideo decoder 30 may comprise an integrated circuit, a microprocessor,and/or a wireless communication device, such as a cellular telephone.

Although not shown in FIG. 1, in some aspects, video encoder 20 andvideo decoder 30 may each be integrated with an audio encoder anddecoder, and may include appropriate MUX-DEMUX units, or other hardwareand software, to handle encoding of both audio and video in a commondata stream or separate data streams. If applicable, MUX-DEMUX units mayconform to the ITU H.223 multiplexer protocol, or other protocols suchas the user datagram protocol (UDP).

This disclosure may generally refer to video encoder 20 “signaling”certain information to another device, such as video decoder 30. Itshould be understood, however, that video encoder 20 may signalinformation by associating certain syntax elements with various encodedportions of video data. That is, video encoder 20 may “signal” data bystoring certain syntax elements to headers of various encoded portionsof video data. In some cases, such syntax elements may be encoded andstored (e.g., stored to storage device 32) prior to being received anddecoded by video decoder 30. Thus, the term “signaling” may generallyrefer to the communication of syntax or other data for decodingcompressed video data, whether such communication occurs in real- ornear-real-time or over a span of time, such as might occur when storingsyntax elements to a medium at the time of encoding, which then may beretrieved by a decoding device at any time after being stored to thismedium.

Video encoder 20 and video decoder 30 may operate according to a videocompression standard, such as the HEVC standard. While the techniques ofthis disclosure are not limited to any particular coding standard, thetechniques may be relevant to the HEVC standard, and particularly to theextensions of the HEVC standard, such as the RExt extension. The HEVCstandardization efforts are based on a model of a video coding devicereferred to as the HEVC Test Model (HM). The HM presumes severaladditional capabilities of video coding devices relative to existingdevices according to, e.g., ITU-T H.264/AVC. For example, whereas H.264provides nine intra-prediction encoding modes, the HM may provide asmany as thirty-five intra-prediction encoding modes.

In general, the working model of the HM describes that a video picturemay be divided into a sequence of treeblocks or largest coding units(LCU) that include both luma and chroma samples. Syntax data within abitstream may define a size for the LCU, which is a largest coding unitin terms of the number of pixels. A slice includes a number ofconsecutive coding tree units (CTUs). Each of the CTUs may comprise acoding tree block of luma samples, two corresponding coding tree blocksof chroma samples, and syntax structures used to code the samples of thecoding tree blocks. In a monochrome picture or a picture that have threeseparate color planes, a CTU may comprise a single coding tree block andsyntax structures used to code the samples of the coding tree block.

A video picture may be partitioned into one or more slices. Eachtreeblock may be split into coding units (CUs) according to a quadtree.In general, a quadtree data structure includes one node per CU, with aroot node corresponding to the treeblock. If a CU is split into foursub-CUs, the node corresponding to the CU includes four leaf nodes, eachof which corresponds to one of the sub-CUs. A CU may comprise a codingblock of luma samples and two corresponding coding blocks of chromasamples of a picture that has a luma sample array, a Cb sample array anda Cr sample array, and syntax structures used to code the samples of thecoding blocks. In a monochrome picture or a picture that have threeseparate color planes, a CU may comprise a single coding block andsyntax structures used to code the samples of the coding block. A codingblock is an N×N block of samples.

Each node of the quadtree data structure may provide syntax data for thecorresponding CU. For example, a node in the quadtree may include asplit flag, indicating whether the CU corresponding to the node is splitinto sub-CUs. Syntax elements for a CU may be defined recursively, andmay depend on whether the CU is split into sub-CUs. If a CU is not splitfurther, it is referred as a leaf-CU. In this disclosure, four sub-CUsof a leaf-CU will also be referred to as leaf-CUs even if there is noexplicit splitting of the original leaf-CU. For example, if a CU at16×16 size is not split further, the four 8×8 sub-CUs will also bereferred to as leaf-CUs although the 16×16 CU was never split.

A CU has a similar purpose as a macroblock of the H.264 standard, exceptthat a CU does not have a size distinction. For example, a treeblock maybe split into four child nodes (also referred to as sub-CUs), and eachchild node may in turn be a parent node and be split into another fourchild nodes. A final, unsplit child node, referred to as a leaf node ofthe quadtree, comprises a coding node, also referred to as a leaf-CU.Syntax data associated with a coded bitstream may define a maximumnumber of times a treeblock may be split, referred to as a maximum CUdepth, and may also define a minimum size of the coding nodes.Accordingly, a bitstream may also define a smallest coding unit (SCU).This disclosure uses the term “block” to refer to any of a CU, PU, orTU, in the context of HEVC, or similar data structures in the context ofother standards (e.g., macroblocks and sub-blocks thereof in H.264/AVC).

A CU includes a coding node and prediction units (PUs) and transformunits (TUs) associated with the coding node. A size of the CUcorresponds to a size of the coding node and must be square in shape.The size of the CU may range from 8×8 pixels up to the size of thetreeblock with a maximum of 64×64 pixels or greater. Each CU may containone or more PUs and one or more TUs.

In general, a PU represents a spatial area corresponding to all or aportion of the corresponding CU, and may include data for retrieving areference sample for the PU. Moreover, a PU includes data related toprediction. For example, when the PU is intra-mode encoded, data for thePU may be included in a residual quadtree (RQT), which may include datadescribing an intra-prediction mode for a TU corresponding to the PU. Asanother example, when the PU is inter-mode encoded, the PU may includedata defining one or more motion vectors for the PU. A prediction blockmay be a rectangular (i.e., square or non-square) block of samples onwhich the same prediction is applied. A PU of a CU may comprise aprediction block of luma samples, two corresponding prediction blocks ofchroma samples of a picture, and syntax structures used to predict theprediction block samples. In a monochrome picture or a picture that havethree separate color planes, a PU may comprise a single prediction blockand syntax structures used to predict the prediction block samples.

TUs may include coefficients in the transform domain followingapplication of a transform, e.g., a discrete cosine transform (DCT), aninteger transform, a wavelet transform, or a conceptually similartransform to residual video data. The residual data may correspond topixel differences between pixels of the unencoded picture and predictionvalues corresponding to the PUs. Video encoder 20 may form the TUsincluding the residual data for the CU, and then transform the TUs toproduce transform coefficients for the CU. A transform block may be arectangular block of samples on which the same transform is applied. Atransform unit (TU) of a CU may comprise a transform block of lumasamples, two corresponding transform blocks of chroma samples, andsyntax structures used to transform the transform block samples. In amonochrome picture or a picture that have three separate color planes, aTU may comprise a single transform block and syntax structures used totransform the transform block samples.

Following transformation, video encoder 20 may perform quantization ofthe transform coefficients. Quantization generally refers to a processin which transform coefficients are quantized to possibly reduce theamount of data used to represent the coefficients, providing furthercompression. The quantization process may reduce the bit depthassociated with some or all of the coefficients. For example, an n-bitvalue may be rounded down to an m-bit value during quantization, where nis greater than m.

Video encoder 20 may scan the transform coefficients, producing aone-dimensional vector from the two-dimensional matrix including thequantized transform coefficients. The scan may be designed to placehigher energy (and therefore lower frequency) coefficients at the frontof the array and to place lower energy (and therefore higher frequency)coefficients at the back of the array. In some examples, video encoder20 may utilize a predefined scan order to scan the quantized transformcoefficients to produce a serialized vector that can be entropy encoded.In other examples, video encoder 20 may perform an adaptive scan.

After scanning the quantized transform coefficients to form aone-dimensional vector, video encoder 20 may entropy encode theone-dimensional vector, e.g., according to context-adaptive variablelength coding (CAVLC), context-adaptive binary arithmetic coding(CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC),Probability Interval Partitioning Entropy (PIPE) coding or anotherentropy encoding methodology. Video encoder 20 may also entropy encodesyntax elements associated with the encoded video data for use by videodecoder 30 in decoding the video data.

Video encoder 20 may further send syntax data, such as block-basedsyntax data, picture-based syntax data, and group of pictures(GOP)-based syntax data, to video decoder 30, e.g., in a picture header,a block header, a slice header, or a GOP header. The GOP syntax data maydescribe a number of pictures in the respective GOP, and the picturesyntax data may indicate an encoding/prediction mode used to encode thecorresponding picture.

Video decoder 30, upon obtaining the coded video data, may perform adecoding pass generally reciprocal to the encoding pass described withrespect to video encoder 20. For example, video decoder 30 may obtain anencoded video bitstream that represents video blocks of an encoded videoslice and associated syntax elements from video encoder 20. Videodecoder 30 may reconstruct the original, unencoded video sequence usingthe data contained in the bitstream.

Video encoder 20 and video decoder 30 may perform intra- andinter-coding of video blocks within video slices. Intra-coding relies onspatial prediction to reduce or remove spatial redundancy in videowithin a given video picture. Inter-coding relies on temporal predictionor inter-view prediction to reduce or remove temporal redundancy invideo within adjacent pictures of a video sequence or reduce or removeredundancy with video in other views. Intra-mode (I mode) may refer toany of several spatial based compression modes. Inter-modes, such asuni-directional prediction (P mode) or bi-prediction (B mode), may referto any of several temporal-based compression modes.

In some examples, such as when coding screen content, video encoder 20and/or video decoder 30 may perform intra block copying (Intra BC) tocode blocks within video slices. To perform Intra BC, video encoder 20and/or video decoder 30 may use blocks of previously coded video datathat are in the same picture as a current block for prediction of thecurrent block. As discussed above, Intra BC is an inter-alike codingtool (meaning that pixel values for a picture are predicted based on apredictor block indicated by a vector). However, using Intra BC inconventional intra prediction pictures may increase the complexityand/or reduce the coding efficiency of Intra BC. Additionally, prior tothe techniques of this disclosure, implementations of video coders usingIntra BC would need to be configured with additional tools to performIntra BC, relative to those used to perform conventional intra- andinter-prediction (e.g., due to Intra BC resulting in block copy inside apicture). As such, it may be desirable to enable a video coder to gainthe efficiencies provided by Intra BC while maintaining some or all ofthe constraints currently applied to Intra BC, and without (significant)modification to the hardware architecture.

In accordance with one or more techniques of this disclosure, as opposedto performing Intra BC to predict a block of a current picture usingconventional intra prediction techniques, video encoder 20 and/or videodecoder 30 may perform Intra BC using techniques similar to conventionalinter prediction. For instance, video encoder 20 and/or video decoder 30may insert an indication of the current picture in a reference picturelist (RPL) used to predict blocks of the current picture, store aversion (i.e., an instance) of the current picture in a referencepicture buffer, and code the block of video data in the current picturebased on a predictor block of video data included in the version of thecurrent picture stored in the reference picture buffer. In this way,encoder 20 and/or video decoder 30 may gain the efficiencies provided byIntra BC while maintaining some or all of the constraints currentlyapplied to Intra BC. Also in this way, encoder 20 and/or video decoder30 may reuse the hardware architecture for conventional intra and interframes for Intra BC without significant modification.

FIG. 2 is a conceptual diagram illustrating an example video sequence 33that includes pictures 34, 35A, 36A, 38A, 35B, 36B, 38B, and 35C, indisplay order. One or more of these pictures may include P-slices,B-slices, or I-slices. In some cases, video sequence 33 may be referredto as a group of pictures (GOP). Picture 39 is a first picture indisplay order for a sequence occurring after video sequence 33. FIG. 2generally represents an example prediction structure for a videosequence and is intended only to illustrate the picture references usedfor encoding different inter-predicted slice types. An actual videosequence may contain more or fewer video pictures that include differentslice types and in a different display order.

For block-based video coding, each of the video pictures included invideo sequence 33 may be partitioned into video blocks or coding units(CUs). Each CU of a video picture may include one or more predictionunits (PUs). In some examples, the prediction methods available topredict PUs within a picture may depend on the picture type. As oneexample, video blocks or PUs in slices of an intra-predicted picture (anI-picture) may be predicted using intra-prediction modes (i.e., spatialprediction with respect to neighboring blocks in the same picture). Asanother example, video blocks or PUs in slices of an inter-predictedpicture (a B-picture or a P-picture) may be predicted using inter orintra-prediction modes (i.e., spatial prediction with respect toneighboring blocks in the same picture or temporal prediction withrespect to other reference pictures). In other words, an I-picture mayinclude I-slices, a P-picture may include both I-slices and P-slices,and a B-picture may include I-slices, P-slices, and B-slices.

Video blocks of a P-slice may be encoded using uni-directionalpredictive coding from a reference picture identified in a referencepicture list. Video blocks of a B-slice may be encoded usingbi-directional predictive coding from multiple reference pictureidentified in multiple reference picture lists.

In the example of FIG. 2, first picture 34 is designated for intra-modecoding as an I-picture. In other examples, first picture 34 may be codedwith inter-mode coding, e.g., as a P-picture, or B-picture, withreference to a first picture of a preceding sequence. Video pictures35A-35C (collectively “video pictures 35”) are designated for coding asB-pictures using bi-prediction with reference to a past picture and afuture picture. As illustrated in the example of FIG. 2, picture 35A maybe encoded as a B-picture with reference to first picture 34 and picture36A, as indicated by the arrows from picture 34 and picture 36A to videopicture 35A. In the example of FIG. 2, first picture 34 and picture 36Amay be included in reference picture lists used during prediction ofblocks of picture 35A. Pictures 35B and 35C are similarly encoded.

Video pictures 36A-36B (collectively “video pictures 36”) may bedesignated for coding as P-pictures, or B-pictures, using uni-directionprediction with reference to a past picture. As illustrated in theexample of FIG. 2, picture 36A is encoded as a P-picture, or B-picture,with reference to first picture 34, as indicated by the arrow frompicture 34 to video picture 36A. Picture 36B is similarly encoded as aP-picture, or B-picture, with reference to picture 38A, as indicated bythe arrow from picture 38A to video picture 36B.

Video pictures 38A-38B (collectively “video pictures 38”) may bedesignated for coding as P-pictures, or B-pictures, usinguni-directional prediction with reference to the same past picture. Asillustrated in the example of FIG. 2, picture 38A is encoded with tworeferences to picture 36A, as indicated by the two arrows from picture36A to video picture 38A. Picture 38B is similarly encoded.

In some examples, each of the pictures may be assigned a unique value(that is, unique to a particular video sequence, e.g., a sequence ofpictures following an instantaneous decoder refresh (IDR) picture indecoding order) that indicates the order in which the pictures are to beoutput. This unique value may be referred to as the picture order count(POC). In some examples, the order in which the pictures are to beoutput may be different than the order in which the pictures are coded.For instance, picture 35A may be output before picture 36A while picture36A may be coded before picture 35A.

In accordance with one or more techniques of this disclosure, a videocoder (e.g., video encoder 20 or video decoder 30) may perform Intra BCby inserting a current picture in a reference picture list (RPL) used topredict blocks in the current picture. For instance, in the example ofFIG. 2, a video coder may insert an indication of picture 35A, alongwith indications of picture 34 and picture 36A, in RPLs used to predictblocks in picture 35A. The video coder may then use picture 35A as areference picture when coding blocks of picture 35A.

FIG. 3 is a block diagram illustrating an example of a video encoder 20that may use techniques for intra block copy described in thisdisclosure. The video encoder 20 will be described in the context ofHEVC coding for purposes of illustration, but without limitation of thisdisclosure as to other coding standards. Moreover, video encoder 20 maybe configured to implement techniques in accordance with the rangeextensions of HEVC.

Video encoder 20 may perform intra- and inter-coding of video blockswithin video slices. Intra-coding relies on spatial prediction to reduceor remove spatial redundancy in video within a given video picture.Inter-coding relies on temporal prediction or inter-view prediction toreduce or remove temporal redundancy in video within adjacent picturesof a video sequence or reduce or remove redundancy with video in otherviews.

In the example of FIG. 3, video encoder 20 may include video data memory40, prediction processing unit 42, reference picture memory 64, summer50, transform processing unit 52, quantization processing unit 54, andentropy encoding unit 56. Prediction processing unit 42, in turn,includes motion estimation unit 44, motion compensation unit 46, andintra-prediction unit 48. For video block reconstruction, video encoder20 also includes inverse quantization processing unit 58, inversetransform processing unit 60, and summer 62. A deblocking filter (notshown in FIG. 3) may also be included to filter block boundaries toremove blockiness artifacts from reconstructed video. If desired, thedeblocking filter would typically filter the output of summer 62.Additional loop filters (in loop or post loop) may also be used inaddition to the deblocking filter.

Video data memory 40 may store video data to be encoded by thecomponents of video encoder 20. The video data stored in video datamemory 40 may be obtained, for example, from video source 18. Referencepicture memory 64 is one example of a decoding picture buffer (DPB) thatstores reference video data for use in encoding video data by videoencoder 20 (e.g., in intra- or inter-coding modes, also referred to asintra- or inter-prediction coding modes). Video data memory 40 andreference picture memory 64 may be formed by any of a variety of memorydevices, such as dynamic random access memory (DRAM), includingsynchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM(RRAM), or other types of memory devices. Video data memory 40 andreference picture memory 64 may be provided by the same memory device orseparate memory devices. In various examples, video data memory 40 maybe on-chip with other components of video encoder 20, or off-chiprelative to those components.

During the encoding process, video encoder 20 receives a video pictureor slice to be coded. The picture or slice may be divided into multiplevideo blocks. Motion estimation unit 44 and motion compensation unit 46perform inter-predictive coding of the received video block relative toone or more blocks in one or more reference pictures to provide temporalcompression or provide inter-view compression. Intra-prediction unit 48may alternatively perform intra-predictive coding of the received videoblock relative to one or more neighboring blocks in the same picture orslice as the block to be coded to provide spatial compression. Videoencoder 20 may perform multiple coding passes (e.g., to select anappropriate coding mode for each block of video data).

Moreover, a partition unit (not shown) may partition blocks of videodata into sub-blocks, based on evaluation of previous partitioningschemes in previous coding passes. For example, the partition unit mayinitially partition a picture or slice into LCUs, and partition each ofthe LCUs into sub-CUs based on rate-distortion analysis (e.g.,rate-distortion optimization). Prediction processing unit 42 may furtherproduce a quadtree data structure indicative of partitioning of an LCUinto sub-CUs. Leaf-node CUs of the quadtree may include one or more PUsand one or more TUs.

Prediction processing unit 42 may select one of the coding modes, intraor inter, e.g., based on error results, and provides the resultingintra- or inter-coded block to summer 50 to generate residual block dataand to summer 62 to reconstruct the encoded block for use as a referencepicture. Prediction processing unit 42 also provides syntax elements,such as motion vectors, intra-mode indicators, partition information,and other such syntax information, to entropy encoding unit 56.

Motion estimation unit 44 and motion compensation unit 46 may be highlyintegrated, but are illustrated separately for conceptual purposes.Motion estimation, performed by motion estimation unit 44, is theprocess of generating motion vectors, which estimate motion for videoblocks. A motion vector, for example, may indicate the displacement of aPU of a video block within a current video picture relative to apredictive block within a reference picture (or other coded unit)relative to the current block being coded within the current picture (orother coded unit). A predictive block is a block that is found toclosely match the block to be coded, in terms of pixel difference, whichmay be determined by sum of absolute difference (SAD), sum of squaredifference (SSD), or other difference metrics. In some examples, videoencoder 20 may calculate values for sub-integer pixel positions ofreference pictures stored in reference picture memory 64. For example,video encoder 20 may interpolate values of one-quarter pixel positions,one-eighth pixel positions, or other fractional pixel positions of thereference picture. Therefore, motion estimation unit 44 may perform amotion search relative to the full pixel positions and fractional pixelpositions and output a motion vector with fractional pixel precision.

Motion estimation unit 44 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from one or more reference picture lists (RPLs)which identify one or more reference pictures stored in referencepicture memory 64. Motion estimation unit 44 sends the calculated motionvector to entropy encoding unit 56 and motion compensation unit 46. Insome examples, motion estimation unit 44 may send an indication of theselected reference picture to entropy encoding unit 56.

In some examples, motion estimation unit 44 may generate the one or moreRPLs. For instance, motion estimation unit 44 may generate a first RPL(List 0) which may include pictures of video data that are before thecurrent picture in an output order (i.e., have lower POC values than thecurrent picture) and a second RPL (List 1) which may include pictures ofvideo data that are after the current picture in the output order (i.e.,have higher POC values than the current picture). In some examples, theRPLs may include short-term and long-term pictures, which may bedifferentiated in that long-term pictures may be stored in referencepicture memory 64 for longer than short-term pictures. In some examples,the picture in reference picture memory 64 may be marked, e.g., aslong-term, short-term, etc.

In some examples, motion estimation unit 44 may generate the one or moreRPLs based on one or more reference picture sets (RPSs). The one or moreRPSs may include: 1) one or more sets of short-term pictures that areavailable to predict the current picture and are before the currentpicture in the output order, referred to as short-term RPS before orRefPicSetStCurrBefore, 2) a set of short-term pictures that areavailable to predict the current picture and are after the currentpicture in the output order, referred to as short-term RPS after orRefPicSetStCurrAfter, 3) a set of short-term pictures that are notavailable to predict the current picture but may be used to codesubsequent picture in a coding order, referred to as short-term RPSunavailable or RefPicSetStFoll, 4) a set of long-term pictures that areavailable to predict the current picture, referred to as long-term RPSavailable or RefPicSetLtCurr, and/or 5) a set of long-term pictures thatare unavailable to predict the current picture, referred to as long-termRPS unavailable or RefPicSetLtFoll.

In some examples, motion estimation unit 44 may include the pictures inthe one or more RPSs in the one or more RPLs in a particular order. Forinstance, to generate the an RPL, motion estimation unit 44 may firstinclude pictures in the short-term RPSs that are available to predictthe current picture (e.g., RefPicSetStCurrBefore and/orRefPicSetStCurrAfter) followed by pictures in the long-term RPSs thatare available to predict the current picture (e.g., RefPicSetLtCurr). Insome examples, each entry in a RPL may have an index value such thatpictures included in the RPL earlier (e.g., pictures in short-term RPSs)have lower index values than pictures included in the RPL later (e.g.,pictures in long-term RPSs).

As discussed above, motion estimation unit 44 may send an indication ofthe selected reference picture to entropy encoding unit 56. In someexamples, motion estimation unit 44 may send the indication by sendingthe index value of the selected reference picture within the RPL.

In some examples, motion estimation unit 44 may output information toenable a video decoder to predict one or more current RPLs from one ormore previous RPLs. For instance, motion estimation unit 44 may causeoutput one or more syntax elements that enable a video decoder to modifyone or more RPLs for a previous slice to generate one or more RPLs for acurrent slice.

In accordance with one or more techniques of this disclosure, as opposedto restricting inter-prediction to use other pictures as referencepictures, motion estimation unit 44 may use a current picture as areference picture to predict blocks of video data included in thecurrent picture. For example, motion estimation unit 44 may store aversion of a current picture in reference picture memory 64. In someexamples, motion estimation unit 44 may store an initialized version ofthe current picture with pixel values initialized to a fixed value. Insome examples, the fixed value may be based on a bit depth of samples ofthe current picture. For instance, the fixed value may be1<<(bitDepth−1). In some examples, motion estimation unit 44 may storethe initialized version of the current picture before encoding anyblocks of the current picture. By storing an initialized version of thecurrent picture, motion estimation unit 44 may not be required toconstrain the search for predictive blocks (i.e., a search region) toblocks that are already reconstructed. By contrast, if motion estimationunit 44 does not store an initialized version of the current picture thesearch for predictive blocks may be constrained to blocks that arealready reconstructed to, for example, avoid a decoder/encoder mismatch.

Prediction processing unit 42 may generate one or more RPLs for thecurrent picture. For instance, prediction processing unit 42 may includethe current picture an RPL for the current picture. In some examples,prediction processing unit 42 may include the current picture at aparticular location within the RPL. As one example, predictionprocessing unit 42 may insert the current picture in the RPL beforepictures in a long-term RPS. For instance, prediction processing unit 42may insert the current picture in the RPL with an index value less thanindex values of pictures from a long-term RPS. In some examples,prediction processing unit 42 may insert the current picture in the RPLdirectly before pictures in a long-term RPS.

As another example, prediction processing unit 42 may insert the currentpicture in the RPL after inserting pictures from a long-term RPS. Forinstance, prediction processing unit 42 may insert the current picturein the RPL with an index value greater than index values of pictures ina long-term RPS. In some examples, motion estimation unit 44 may insertthe current picture in the RPL directly after inserting pictures from along-term RPS.

As another example, prediction processing unit 42 may insert the currentpicture in the RPL at a fixed position. For instance, predictionprocessing unit 42 may insert the current picture in the RPL with afixed index value. In some examples, the fixed index value may be −1, ornum_ref_idx_11_active_minus1+1. In some of such examples, motionestimation unit 44 may not code a flag that indicates that the currentblock is coded using Intra BC (i.e., intra_bc_flag). In some of suchexamples, motion estimation unit 44 may code a flag that indicates thatthe current block is coded using Intra BC (i.e., intra_bc_flag).

In some examples, such as where motion vectors are predicted usingtemporal motion vector prediction (TMVP), motion estimation unit 44 mayapply one or more constraints such that the current picture is not usedas the collocated picture for itself. For instance, motion estimationunit 44 may code a syntax element that specifies the reference index ofthe collocated picture used for TMVP (e.g., collocated_ref_idx) suchthat RefPicListX[collocated_ref_idx] is not the current picture where Xis equal to collocated_from_10_flag.

As discussed above, when encoding a block of video data of a currentpicture of video data, motion estimation unit 44 may select a predictiveblock that closely matches the current block. In accordance with one ormore techniques of this disclosure, as opposed to (or in addition to)searching blocks of other pictures, motion estimation unit 44 may selecta block located in the current picture for use as a predictive block forthe current block of the current picture. For example, motion estimationunit 44 may perform a search on pictures including one or more referencepictures, including the current picture. For each picture, motionestimation unit 44 may calculate search results reflecting how well apredicted block matches the current block, e.g., using pixel-by-pixelsum of absolute differences (SAD), sum of squared differences (SSD),mean absolute difference (MAD), mean squared difference (MSD), or thelike. Then, motion estimation unit 44 may identify a block in a picturehaving the best match to the current block, and indicate the position ofthe block and the picture (which may be the current picture) toprediction processing unit 42. In this way, motion estimation unit 44may perform Intra BC, e.g., when motion estimation unit 44 determinesthat a predicted block is included in the current picture, that is, thesame picture as the current block being predicted.

In some examples, motion estimation unit 44 may restrict the search forthe predictive block in the current picture. For instance, where thecurrent block is located in a current slice, motion estimation unit 44may restrict the search for the predictive block to previously codedareas of the current slice (e.g., areas above and/or to the left of thecurrent block in the current slice). As such, in some examples,previously coded areas of previous slices of the current picture may notbe used as predictive blocks for performing Intra BC. However, asdiscussed above, in some examples, the previously coded areas ofprevious slices of the current picture may be used as predictive blocksfor performing Intra BC. In some examples, motion estimation unit 44 mayrestrict the search for the predictive block using similar restrictionsas motion search in inter reference pictures (e.g., like search range ofmotion estimation).

In some examples, prediction processing unit 42 may cause entropyencoding unit 56 to encode one or more syntax elements to indicatewhether a current picture may be present in an RPL used to predict thecurrent picture. As one example, prediction processing unit 42 may causeentropy encoding unit 56 to encode a single syntax element thatindicates whether pictures of the video data may be present in RPLs usedto predict themselves. In some examples, prediction processing unit 42may cause entropy encoding unit 56 to include the single syntax elementin a video parameter set (VPS) referred to by the current picture, asequence parameter set (SPS) referred to by the current picture, or apicture parameter set (PPS) referred to by the current picture.

As another example, prediction processing unit 42 may cause entropyencoding unit 56 to encode multiple syntax elements to indicate whetherthe current picture may be present in a RPL used to predict the currentpicture. For instance, prediction processing unit 42 may cause entropyencoding unit 56 to may encode a first syntax element that indicateswhether pictures of the video data may be present in RPLs used topredict the respective pictures of the video data (i.e., used to predictthemselves). In some examples, prediction processing unit 42 may causeentropy encoding unit 56 to include the first syntax element in a VPSreferred to by the current picture, a SPS referred to by the currentpicture, or a PPS referred to by the current picture (or slice of thecurrent picture). In some examples, such as where the syntax elementindicates that pictures of the video data may be present in RPLs used topredict themselves, prediction processing unit 42 may cause entropyencoding unit 56 to encode a second syntax element that indicateswhether the current picture of the video data may be present in the RPLused to predict the current slice. In some examples, predictionprocessing unit 42 may cause entropy encoding unit 56 to include thesecond syntax element in a slice header of the current slice.

In some examples, prediction processing unit 42 may not cause entropyencoding unit 56 to encode a syntax element that indicates whether ablock is coded using Intra Block Copy (Intra BC). For instance,prediction processing unit 42 may not cause entropy encoding unit 56 toencode intra_bc_flag in the coding unit syntax of blocks that arepredicted using Intra BC in accordance with the techniques of thisdisclosure.

In some examples, in addition to coding blocks in B-slices and P-slicesusing Intra BC, prediction processing unit 42 may construct one or moreRPLs that include the current picture to encode blocks of an I-slice ofthe current picture. In some such examples, it may be assumed that theone or more RPLs only include the current picture. In some examples,prediction processing unit 42 may cause entropy encoding unit 56 toencode a syntax element to indicate whether the current picture may beused as a reference picture of I-slices included in the current picture.In some examples, prediction processing unit 42 may cause entropyencoding unit 56 to include the syntax element in a VPS referred to bythe current picture, a SPS referred to by the current picture, a PPSreferred to by the current picture, or a slice header of a currentI-slice. In some examples, prediction processing unit 42 may still useone or both of AMVP and merge. In some examples, prediction processingunit 42 may not cause entropy encoding unit 56 to signal the targetreference index for AMVP for the I-slice such that a decoder derives thetarget reference index as a fix value, e.g., 0. In some examples,prediction processing unit 42 may cause entropy encoding unit 56 tosignal the target reference index for AMVP for the I-slice, but thevalue of the target reference index may be constrained to be a fixvalue, e.g., 0.

As discussed above, the pictures stored by reference picture memory 64may be marked as short-term, long-term, another marking, and/or notmarked. In some examples, such as when the current slice is an I-sliceand Intra BC is enabled, prediction processing unit 42 may mark thecurrent picture as either long-term or short-term. In some examples,such as when the current slice is an I-slice and Intra BC is enabled,prediction processing unit 42 may not mark the current picture as eitherlong-term or short-term.

In some examples, prediction processing unit 42 may mark the currentpicture as long-term before coding the current picture and mark thecurrent picture as short-term after coding the current picture. In someof such examples, such as where the current slice an I-slice, predictionprocessing unit 42 may generate a merge candidate list to containcandidates referring purely to an Intra BC reference (marked as“long-term”) or other candidates that refer to Inter references (markedas “short-term”). In this way, prediction processing unit 42 maygenerate a candidate list to contain both Intra BC candidates and normal(Inter-prediction) candidates. In some examples, prediction processingunit 42 may bi-directionally predict a merge candidate from an Intra BCreference and an inter-prediction reference. In some of such asexamples, such as where the current slice is an inter coded slice (e.g.,a B-slice or a P-slice), prediction processing unit 42 may omit anadditional flag indicating flag indicating whether current block iscoded with Intra BC (intra_bc_flag).

In some examples, such as where temporal motion vector prediction (TMVP)is enabled and Intra BC is enabled by assuming the current frame is anadditional reference picture, prediction processing unit 42 may causeentropy encoding unit 56 to code a syntax element that indicates whetherthe target merge reference picture is the current picture or a firstpicture in a RPL (e.g., either RefPicList0[0] or RefPicList1[0]). Insome examples, prediction processing unit 42 may identify the referencepicture by deriving or signaling a target index for a long-term (IntraBC) category of references or a short-term category of references, andapplying a different target merge index based on the category of theco-located block's reference picture.

For instance, prediction processing unit 42 may identify the referencepicture by signaling or deriving a target index for a long-term (IntraBC) category of references or short-term category of references, andbased on the category of the co-located block's reference picture, adifferent target merge index applies.

As discussed above, prediction processing unit 42 may determine a motionvector that represents a displacement between the current block of videodata and the predictor block of video data, and output the determinedvector to entropy encoding unit 56 and motion compensation unit 46. Insome examples, prediction processing unit 42 may determine the motionvector with integer precision. In such examples, such as where thecurrent picture is a marked as a long-term reference picture, predictionprocessing unit 42 may not use normal long-term reference pictures topredict the current picture (i.e., long-term reference pictures that arenot the current picture). Also, in such examples, prediction processingunit 42 may utilize the advanced motion vector prediction (AMVP) ormerge related decoding process as in HEVC version 1 without any change,e.g., as the Intra BC motion vector is predicted only based on Intra BCmotion vectors of the spatial and temporal neighboring blocks.

In some examples, prediction processing unit 42 may determine the motionvector with different levels of precision. For instance, predictionprocessing unit 42 may determine the motion vector with integerprecision, default precision, or finest motion precision (e.g., ¼ pixel(“pel”) precision in HEVC). In some examples, prediction processing unit42 may encode a syntax element that indicates the precision of the codedIntra BC motion vectors, e.g., in a SPS or VPS referred to by thecurrent picture. In some examples, the precision of the Intra BC motionvectors may be adaptive at the picture level and prediction processingunit 42 may cause entropy encoding unit 56 to encode a syntax elementthat indicates the precision of the coded Intra BC motion vectors, e.g.,in a PPS or slice referred to by the current block.

In some examples, prediction processing unit 42 may perform one or moreoperations to compensate for the precision level of the Intra BC motionvectors. As one example, before storing blocks into reference picturememory 64, prediction processing unit 42 may left shift x- andy-components of the motion vector of each block coded with Intra BC,such as by 2 when the finest precision is ¼-pel, or by any other meansof rounding, such as +/− 2 after left shift. As another example, whencoding a current slice with Intra BC motion vectors having a precisionof integer, prediction processing unit 42 may process a co-locatedpicture in a way that the motion vector of each Intra BC coded block isright shifted, such as by 2 when the finest precision is ¼-pel. In someexamples, such as when a current slice is coded with Intra BC motionvectors having the finest motion precision, prediction processing unit42 may not apply the above process of motion vector right shift.

In some examples, where the current picture is marked as a long-termreference picture, prediction processing unit 42 may still use normallong-term reference pictures to predict the current picture. To preventa motion vector referring to a normal long-term reference picture andmotion vector referring to a current picture from predicting from eachother during merge or AMVP, prediction processing unit 42 maydistinguish a normal long-term reference picture and the current pictureduring the merge or AMVP process. For instance, prediction processingunit 42 may distinguish a normal long-term reference picture from thecurrent picture by determining whether the picture order count (POC)value of the reference picture is the same as the POC of the currentpicture.

Motion compensation, performed by motion compensation unit 46, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation unit 44. Again, motion estimationunit 44 and motion compensation unit 46 may be functionally integrated,in some examples. Upon receiving the motion vector for the PU of thecurrent block, motion compensation unit 46 may locate the predictiveblock to which the motion vector points in one of the reference picturelists (RPLs). Summer 50 forms a residual video block by subtractingpixel values of the predictive block from the pixel values of thecurrent block being coded, forming pixel difference values, as discussedbelow. In general, motion estimation unit 44 performs motion estimationrelative to luma components, and motion compensation unit 46 uses motionvectors calculated based on the luma components for both chromacomponents and luma components. Prediction processing unit 42 may alsogenerate syntax elements associated with the video blocks and the videoslice for use by video decoder 30 in decoding the video blocks of thevideo slice.

Intra-prediction unit 48 may intra-predict a current block, as analternative to the inter-prediction performed by motion estimation unit44 and motion compensation unit 46, as described above. In particular,intra-prediction unit 48 may determine an intra-prediction mode to useto encode a current block. In some examples, intra-prediction unit 48may encode blocks using various intra-prediction modes, e.g., duringseparate encoding passes, and intra-prediction unit 48 may select anappropriate intra-prediction mode to use from a plurality ofintra-prediction modes.

For example, intra-prediction unit 48 may calculate rate-distortionvalues using a rate-distortion analysis for the various testedintra-prediction modes, and select the intra-prediction mode having thebest rate-distortion characteristics among the tested modes.Rate-distortion analysis generally determines an amount of distortion(or error) between an encoded block and an original, unencoded blockthat was encoded to produce the encoded block, as well as a bitrate(that is, a number of bits) used to produce the encoded block.Intra-prediction unit 48 may calculate ratios from the distortions andrates for the various encoded blocks to determine which intra-predictionmode exhibits the best rate-distortion value for the block.

In some examples, the plurality of intra-prediction modes available foruse by intra-prediction unit 48 may include a planar prediction mode, aDC prediction mode, and one or more angular prediction modes. Regardlessof the selected mode, intra-prediction unit 48 may always predict acurrent block based on reconstructed blocks adjacent to the currentblock. As one example, when using the planar prediction mode,intra-prediction unit 48 may predict a current block by averaginghorizontal and vertical predictions determined. In some examples,intra-prediction unit 48 may determine the horizontal predictions basedon a left neighboring block and a top-right neighboring block (assamples of the right neighboring block may not be reconstructed whenpredicting the current block) and determine the vertical predictionsbased on a top neighboring block and a bottom-left neighboring block (assamples of the bottom neighboring block may not be reconstructed whenpredicting the current block).

As another example, when using the DC prediction mode, intra-predictionunit 48 may predict samples of a current block with a constant value. Insome examples, the constant value may represent an average of samples inthe left-neighboring block and samples in the top neighboring block. Asanother example, when using one of the one or more angular predictionmodes, intra-prediction unit 48 may predict samples of a current blockbased on samples from a neighboring block indicated by a predictiondirection. FIG. 4 illustrates an example of angular intra-predictionmodes that may be used by intra-prediction unit 48. The arrowsillustrated by FIG. 4 represent a prediction direction (i.e., extendingaway from the current block).

In some examples, each of the plurality of intra-prediction modes mayhave a corresponding mode index, which may be signaled (i.e., to a videodecoder) by intra-prediction unit 48. The numbers illustrated in FIG. 4are mode indexes corresponding to the angular intra-prediction modesdiscussed above. In addition to the mode indexes illustrated by FIG. 4,the planar mode may have an index of 0 and the DC mode may have an indexof 1. As discussed above and in accordance with one or more techniquesof this disclosure, as opposed to coding a block in a current framebased on an intra mode index, motion estimation unit 44 may predict ablock in a current frame based on a predictor block in the current frameidentified by a motion vector.

Video encoder 20 forms a residual video block by subtracting theprediction data from prediction processing unit 42 from the originalvideo block being coded. Summer 50 represents the component orcomponents that perform this subtraction operation.

Transform processing unit 52 applies a transform, such as a discretecosine transform (DCT) or a conceptually similar transform, to theresidual block, producing a video block comprising residual transformcoefficient values. Transform processing unit 52 may perform othertransforms which are conceptually similar to DCT. Wavelet transforms,integer transforms, sub-band transforms or other types of transformscould also be used. In any case, transform processing unit 52 appliesthe transform to the residual block, producing a block of residualtransform coefficients. The transform may convert the residualinformation from a pixel value domain to a transform domain, such as afrequency domain.

Transform processing unit 52 may send the resulting transformcoefficients to quantization processing unit 54. Quantization processingunit 54 quantizes the transform coefficients to further reduce bit rate.The quantization process may reduce the bit depth associated with someor all of the coefficients. The degree of quantization may be modifiedby adjusting a quantization parameter. In some examples, quantizationprocessing unit 54 may then perform a scan of the matrix including thequantized transform coefficients. Alternatively, entropy encoding unit56 may perform the scan.

Following quantization, entropy encoding unit 56 entropy codes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy coding technique. In the caseof context-based entropy coding, context may be based on neighboringblocks. Following the entropy coding by entropy encoding unit 56, theencoded bitstream may be transmitted to another device (e.g., videodecoder 30) or archived for later transmission or retrieval.

Inverse quantization processing unit 58 and inverse transform processingunit 60 apply inverse quantization and inverse transformation,respectively, to reconstruct the residual block in the pixel domain,e.g., for later use as a reference block.

Motion compensation unit 46 may also apply one or more interpolationfilters to the reference block to calculate sub-integer pixel values foruse in motion estimation. Summer 62 adds the reconstructed residualblock to the motion compensated prediction block produced by motioncompensation unit 46 to produce a reconstructed video block for storagein reference picture memory 64. The reconstructed video block may beused by motion estimation unit 44 and motion compensation unit 46 as areference block to inter-code a block in a subsequent video picture. Insome examples, such as where the current picture is used as a referencepicture to predict the current picture, motion compensation unit 46and/or summer 62 may update the version of the current picture stored byreference picture memory 64 at regular intervals while coding thecurrent picture. As one example, motion compensation unit 46 and/orsummer 62 may update the version of the current picture stored byreference picture memory 64 after coding each block of the currentpicture. For instance, where the samples of the current block are storedin reference picture memory 64 as initialized values, motioncompensation unit 46 and/or summer 62 may update the samples of thecurrent of the current picture stored by reference picture memory 64with the reconstructed samples for the current block.

A filtering unit (not shown) may perform a variety of filteringprocesses. For example, the filtering unit may perform deblocking. Thatis, the filtering unit may receive a plurality of reconstructed videoblocks forming a slice or a frame of reconstructed video and filterblock boundaries to remove blockiness artifacts from a slice or frame.In one example, the filtering unit evaluates the so-called “boundarystrength” of a video block. Based on the boundary strength of a videoblock, edge pixels of a video block may be filtered with respect to edgepixels of an adjacent video block such that the transition from onevideo block are more difficult for a viewer to perceive.

In some examples, motion compensation unit 46 and/or summer 62 mayupdate the version of the current picture stored by reference picturememory 64 before the filtering performs the filtering (e.g., deblockingand/or SAO) to the samples. For instance, the filtering unit may waituntil the whole picture is coded before applying the filtering. In thisway, motion estimation unit 44 may use the current picture as areference before applying the filtering. In some examples, the filteringunit may perform the filtering as the version of the current picturestored by reference picture memory 64 is updated. For instance, thefiltering unit may apply the filtering as each block is updated. In thisway, motion estimation unit 44 may use the current picture as areference after applying the filtering.

While a number of different aspects and examples of the techniques aredescribed in this disclosure, the various aspects and examples of thetechniques may be performed together or separately from one another. Inother words, the techniques should not be limited strictly to thevarious aspects and examples described above, but may be used incombination or performed together and/or separately. In addition, whilecertain techniques may be ascribed to certain units of video encoder 20(such as intra prediction unit 48, motion compensation unit 46, orentropy encoding unit 56) it should be understood that one or more otherunits of video encoder 20 may also be responsible for carrying out suchtechniques.

In this way, video encoder 20 may be configured to implement one or moreexample techniques described in this disclosure. For example, videoencoder 20 may be configured code a block of video data in a currentframe using a predictor block included in the current frame. Videoencoder 20 may further be configured to output a bitstream that includesa syntax element indicative of whether or not a picture referring to aVPS/SPS/PPS may be present in a reference picture list of the pictureitself, e.g., for the purpose of coding one or more blocks of thecurrent picture using Intra BC. That is, when a block is coded usingintra BC mode, video encoder 20 may (assuming the syntax elementindicates that a current picture can be included in a reference picturelist for itself) signal that a reference picture for the block is thepicture including the block, e.g., using an index value into a referencepicture list such that the index value corresponds to the pictureitself. Video encoder 20 may include this index value in motioninformation of the block that is coded using intra BC mode. In someexamples, the hardware architecture of video encoder 20 may not bespecifically adapted for using a current picture as a reference pictureto predict a current block of the current picture.

FIG. 5 is a block diagram illustrating an example of video decoder 30that may implement techniques described in this disclosure. Again, thevideo decoder 30 will be described in the context of HEVC coding forpurposes of illustration, but without limitation of this disclosure asto other coding standards. Moreover, video decoder 30 may be configuredto implement techniques in accordance with the range extensions.

In the example of FIG. 5, video decoder 30 may include video data memory69, entropy decoding unit 70, prediction processing unit 71, inversequantization processing unit 76, inverse transform processing unit 78,summer 80, and reference picture memory 82. Prediction processing unit71 includes motion compensation unit 72 and intra prediction unit 74.Video decoder 30 may, in some examples, perform a decoding passgenerally reciprocal to the encoding pass described with respect tovideo encoder 20 from FIG. 3.

Video data memory 69 may store video data, such as an encoded videobitstream, to be decoded by the components of video decoder 30. Thevideo data stored in video data memory 69 may be obtained, for example,from storage device 34, from a local video source, such as a camera, viawired or wireless network communication of video data, or by accessingphysical data storage media. Video data memory 69 may form a codedpicture buffer (CPB) that stores encoded video data from an encodedvideo bitstream.

Reference picture memory 82 is one example of a decoded picture buffer(DPB) that stores reference video data for use in decoding video data byvideo decoder 30 (e.g., in intra- or inter-coding modes). Video datamemory 69 and reference picture memory 82 may be formed by any of avariety of memory devices, such as dynamic random access memory (DRAM),including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM),resistive RAM (RRAM), or other types of memory devices. Video datamemory 69 and reference picture memory 82 may be provided by the samememory device or separate memory devices. In various examples, videodata memory 69 may be on-chip with other components of video decoder 30,or off-chip relative to those components.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Entropy decoding unit70 of video decoder 30 entropy decodes the bitstream to generatequantized coefficients, motion vectors or intra-prediction modeindicators, and other syntax elements. Entropy decoding unit 70 forwardsthe motion vectors to and other syntax elements to motion compensationunit 72. Video decoder 30 may receive the syntax elements at the videoslice level and/or the video block level.

In some examples, when the video slice is coded as an intra-coded (I)slice, intra prediction unit 74 may generate prediction data for a videoblock of the current video slice based on a signaled intra predictionmode and data from previously decoded blocks of the current picture. Insome examples, when the video picture is coded as an inter-coded (i.e.,B or P) slice, motion compensation unit 72 produces predictive blocksfor a video block of the current video slice based on the motion vectorsand other syntax elements received from entropy decoding unit 70. Thepredictive blocks may be produced from one of the reference pictureswithin one of the reference picture lists (RPLs). Prediction processingunit 71 may construct the RPLs, e.g., List 0 and List 1, usingconstruction techniques based on reference pictures stored in referencepicture memory 82.

In accordance with one or more techniques of this disclosure, as opposedto restricting inter-prediction to use other pictures as referencepictures, video decoder 30 may use a current picture as a referencepicture to predict blocks of video data included in the current picture.For example, prediction processing unit 71 may store a version of acurrent picture in prediction processing unit 71. In some examples,prediction processing unit 71 may store an initialized version of thecurrent frame with pixel values initialized to a fixed value. In someexamples, the fixed value may be based on a bit depth of samples of thecurrent picture. For instance, the fixed value may be 1<<(bitDepth−1).In some examples, prediction processing unit 71 may store theinitialized version of the current picture before encoding any blocks ofthe current picture. By storing an initialized version of the currentpicture, prediction processing unit 71 may use predictive blocks are notyet reconstructed. By contrast, if prediction processing unit 71 doesnot store an initialized version of the current picture only blocks thatare already reconstructed may be used as predictor blocks (i.e., toavoid a decoder/encoder mismatch).

As discussed above, prediction processing unit 71 may generate one ormore RPLs for the current picture. For instance, prediction processingunit 71 may include the current picture an RPL for the current picture.In some examples, prediction processing unit 71 may include the currentpicture at a particular location within the RPL. As one example,prediction processing unit 71 may insert the current picture in the RPLbefore pictures in a long-term RPS. For instance, prediction processingunit 71 may insert the current picture in the RPL with an index valueless than index values of pictures from a long-term RPS. In someexamples, prediction processing unit 71 may insert the current picturein the RPL directly before pictures in a long-term RPS.

As another example, prediction processing unit 71 may insert the currentpicture in the RPL after inserting pictures from a long-term RPS. Forinstance, prediction processing unit 71 may insert the current picturein the RPL with an index value greater than index values of pictures ina long-term RPS. In some examples, prediction processing unit 71 mayinsert the current picture in the RPL directly after inserting picturesfrom a long-term RPS.

As another example, prediction processing unit 71 may insert the currentpicture in the RPL at a fixed position. For instance, predictionprocessing unit 71 may insert the current picture in the RPL with afixed index value. In some examples, the fixed index value may be −1, ornum_ref_idx_11_active_minus1+1. In some of such examples, predictionprocessing unit 71 may not receive a flag that indicates that thecurrent block is coded using Intra BC (i.e., intra_bc_flag) from entropydecoding unit 70.

In some examples, such as where motion vectors are predicted usingtemporal motion vector prediction (TMVP), prediction processing unit 71may apply one or more constraints such that the current picture is notused as the collocated picture for itself. For instance, predictionprocessing unit 71 may receive, from entropy decoding unit 70, a syntaxelement that specifies the reference index of the collocated pictureused for TMVP (e.g., collocated_ref_idx) such thatRefPicListX[collocated_ref_idx] is not the current picture where X isequal to collocated_from_10_flag.

As discussed above, video decoder 30 may decode a block of video data ofa current picture of video data based on a predictive block. Inaccordance with one or more techniques of this disclosure, motioncompensation unit 72 may select a block located in the current picturefor use as a predictive block for the current block of the currentpicture. In particular, prediction processing unit 71 may construct, fora current block, an RPL that includes the current picture, motioncompensation unit 72 may receive motion parameters for the current blockindicating an index in the RPL. In some examples, the index may identifythe current picture in the RPL. When this occurs, motion compensationunit 72 may use a motion vector included in the motion parameters toextract a predicted block from the current picture itself at a positionidentified by the motion vector relative to the current block. In thisway, motion compensation unit 72 may perform Intra BC.

In some examples, prediction processing unit 71 may receive, fromentropy decoding unit 70, one or more syntax elements to indicatewhether a current picture may be present in a RPL used to predict thecurrent picture. As one example, prediction processing unit 71 mayreceive a single syntax element that indicates whether pictures of thevideo data may be present in RPLs used to predict themselves. In someexamples, prediction processing unit 71 may receive the single syntaxelement from a video parameter set (VPS) referred to by the currentpicture, a sequence parameter set (SPS) referred to by the currentpicture, or a picture parameter set (PPS) referred to by the currentpicture.

As another example, prediction processing unit 71 may receive, fromentropy decoding unit 70, multiple syntax elements to indicate whetherthe current picture may be present in a RPL used to predict the currentpicture. For instance, prediction processing unit 71 may receive a firstsyntax element that indicates whether pictures of the video data may bepresent in RPLs used to predict themselves. In some examples, predictionprocessing unit 71 may receive the first syntax element from a VPSreferred to by the current picture, a SPS referred to by the currentpicture, or a PPS referred to by the current picture. In some examples,such as where the syntax element indicates that pictures of the videodata may be present in RPLs used to predict themselves, predictionprocessing unit 71 may receive a second syntax element that indicateswhether the current picture of the video data may be present in the RPLused to predict the current slice. In some examples, predictionprocessing unit 71 may receive the second syntax element from a sliceheader of the current slice.

In some examples, prediction processing unit 71 may not receive a syntaxelement that indicates whether a block is coded using Intra Block Copy(Intra BC). For instance, prediction processing unit 71 may not receiveintra_bc_flag in the coding unit syntax of blocks that are predictedusing Intra BC in accordance with the techniques of this disclosure.

In some examples, in addition to coding blocks in B-slices and P-slicesusing Intra BC, prediction processing unit 71 may construct one or moreRPLs that include the current picture to decode blocks of an I-slice ofthe current picture. In some such examples, it may be assumed that theone or more RPLs only include the current picture. In some examples,prediction processing unit 71 may receive a syntax element thatindicates whether the current picture may be used as a reference pictureof I-slices included in the current picture. In some examples,prediction processing unit 71 may decode the syntax element from a VPSreferred to by the current picture, a SPS referred to by the currentpicture, a PPS referred to by the current picture, or a slice header ofa current I-slice. In some examples, prediction processing unit 71 maystill use one or both of AMVP and merge. In some examples, predictionprocessing unit 71 may not receive the target reference index for AMVPfor the I-slice from the encoder and may derive the target referenceindex as a fix value, e.g., 0. In some examples, prediction processingunit 71 may receive the target reference index for AMVP for the I-slice,but the value of the target reference index may be constrained to be afix value, e.g., 0.

The pictures stored by reference picture memory 82 may be marked asshort-term, long-term, another marking, and/or not marked. In someexamples, such as when the current slice is an I-slice and Intra BC isenabled, prediction processing unit 71 may mark the current picture aseither long-term or short-term. In some examples, such as when thecurrent slice is an I-slice and Intra BC is enabled, predictionprocessing unit 71 may not mark the current picture as either long-termor short-term.

In some examples, prediction processing unit 71 may mark the currentpicture as long-term before decoding the current picture and mark thecurrent picture as short-term after decoding the current picture. Insome of such examples, such as where the current slice an I-slice,prediction processing unit 71 may generate a merge candidate list tocontain candidates referring purely to an Intra BC reference (marked as“long-term”) or other candidates that refer to Inter references (markedas “short-term”). In this way, prediction processing unit 71 maygenerate a candidate list to contain both Intra BC candidates and normal(Inter-prediction) candidates. In some examples, prediction processingunit 71 may bi-directionally predict a merge candidate from an Intra BCreference and an inter-prediction reference. In some of such asexamples, such as where the current slice is an inter coded slice (e.g.,a B-slice or a P-slice), prediction processing unit 71 may not receivean additional flag indicating flag indicating whether current block iscoded with Intra BC (intra_bc_flag).

In some examples, such as where temporal motion vector prediction (TMVP)is enabled and Intra BC is enabled by assuming the current frame is anadditional reference picture, prediction processing unit 71 may receivea syntax element that indicates whether the target merge referencepicture is the current picture or a first picture in a RPL (e.g., eitherRefPicList0[0] or RefPicList1[0]). In some examples, predictionprocessing unit 71 may identify the reference picture by deriving orreceiving a target index for a long-term (Intra BC) category ofreferences or a short-term category of references, and applying adifferent target merge index based on the category of the co-locatedblock's reference picture. For instance, prediction processing unit 71may identify the reference picture by signaling or deriving a targetindex for a long-term (Intra BC) category of references or short-termcategory of references, and based on the category of the co-locatedblock's reference picture, a different target merge index applies.

Prediction processing unit 71 may determine a motion vector thatrepresents a displacement between the current block of video data andthe predictor block of video data. In some examples, predictionprocessing unit 71 may determine the motion vector based on one or moresyntax elements received in the encoded video bitstream. In someexamples, prediction processing unit 71 may determine the motion vectorwith integer precision. In such examples, such as where the currentpicture is a marked as a long-term reference picture, predictionprocessing unit 71 may not use normal long-term reference pictures topredict the current picture (i.e., long-term reference pictures that arenot the current picture). Also, in such examples, prediction processingunit 71 may utilize the advanced motion vector prediction (AMVP) ormerge related decoding process as in HEVC version 1 without any change,e.g., as the Intra BC motion vector is predicted only based on Intra BCmotion vectors of the spatial and temporal neighboring blocks.

In some examples, prediction processing unit 71 may determine the motionvector with different levels of precision. For instance, predictionprocessing unit 71 may determine the motion vector with integerprecision, default precision, or finest motion precision (e.g., ¼ pelprecision in HEVC). In some examples, prediction processing unit 71 mayreceive a syntax element that indicates the precision of the coded IntraBC motion vectors, e.g., in a SPS or VPS referred to by the currentpicture. In some examples, the precision of the Intra BC motion vectorsmay be adaptive at the picture level and prediction processing unit 71may receive a syntax element that indicates the precision of the codedIntra BC motion vectors, e.g., in a PPS or slice referred to by thecurrent block.

In some examples, prediction processing unit 71 may perform one or moreoperations to compensate for the precision level of the Intra BC motionvectors. As one example, before storing blocks into reference picturememory 82, prediction processing unit 71 may left shift the motionvector of each block coded with Intra BC, such as by 2 when the finestprecision is ¼-pel, or by any other means of rounding, such as +/− 2after left shift. As another example, when coding a current slice withIntra BC motion vectors having a precision of integer, predictionprocessing unit 71 may process a co-located picture in a way that themotion vector of each Intra BC coded block is right shifted, such as by2 when the finest precision is ¼-pel. In some examples, such as when acurrent slice is coded with Intra BC motion vectors having the finestmotion precision, prediction processing unit 71 may not apply the aboveprocess of motion vector right shift.

In some examples, where the current picture is a marked as a long-termreference picture, prediction processing unit 71 may still use normallong-term reference pictures to predict the current picture. To preventa motion vector referring to a normal long-term reference picture andmotion vector referring to a current picture from predicting from eachother during merge or AMVP, prediction processing unit 71 maydistinguish a normal long-term reference picture and current pictureduring the merge or AMVP process.

Motion compensation unit 72 determines prediction information for avideo block of the current video slice by parsing the motion vectors andother syntax elements, and uses the prediction information to producethe predictive blocks for the current block being decoded. For example,motion compensation unit 72 uses some of the received syntax elements todetermine a prediction mode (e.g., intra- or inter-prediction) used tocode the video blocks of the video slice, an inter-prediction slice type(e.g., B slice or P slice), construction information for one or more ofthe reference picture lists for the slice, motion vectors for eachinter-encoded video block of the slice, inter-prediction status for eachinter-coded video block of the slice, and other information to decodethe video blocks in the current video slice.

Motion compensation unit 72 may also perform interpolation based oninterpolation filters. Motion compensation unit 72 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 72 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization processing unit 76 inverse quantizes, i.e.,de-quantizes, the quantized transform coefficients provided in thebitstream and decoded by entropy decoding unit 70. The inversequantization process may include use of a quantization parameter QP_(Y)calculated by video decoder 30 for each video block in the video sliceto determine a degree of quantization and, likewise, a degree of inversequantization that should be applied.

Inverse transform processing unit 78 applies an inverse transform, e.g.,an inverse DCT, an inverse integer transform, or a conceptually similarinverse transform process, to the transform coefficients in order toproduce residual blocks in the pixel domain. Video decoder 30 forms adecoded video block by summing the residual blocks from inversetransform processing unit 78 with the corresponding predictive blocksgenerated by motion compensation unit 72. Summer 80 represents thecomponent or components that perform this summation operation.

Video decoder 30 may include a filtering unit, which may, in someexamples, be configured similarly to the filtering unit of video encoder20 described above. For example, the filtering unit may be configured toperform deblocking, SAO, or other filtering operations when decoding andreconstructing video data from an encoded bitstream.

While a number of different aspects and examples of the techniques aredescribed in this disclosure, the various aspects and examples of thetechniques may be performed together or separately from one another. Inother words, the techniques should not be limited strictly to thevarious aspects and examples described above, but may be used incombination or performed together and/or separately. In addition, whilecertain techniques may be ascribed to certain units of video decoder 30it should be understood that one or more other units of video decoder 30may also be responsible for carrying out such techniques.

In this way, video decoder 30 may be configured to implement one or moreexample techniques described in this disclosure. For example, videodecoder 30 may be configured to receive a bitstream that includes asyntax element indicative of whether or not a picture referring to a PPSmay be present in a reference picture list of the picture itself, e.g.,for the purpose of coding one or more blocks of the current pictureusing intra BC mode. That is, video decoder 30 may decode a value forthe syntax element that indicates that a current picture can be includedin a reference picture list for itself. Accordingly, when a block iscoded using intra BC mode, video decoder 30 may determine that areference picture for the block is the picture including the block,e.g., using an index value into a reference picture list such that theindex value corresponds to the picture itself. Video decoder 30 maydecode this index value from motion information of the block that iscoded using intra BC mode. In some examples, the hardware architectureof video decoder 30 may not be specifically adapted for using a currentpicture as a reference picture to predict a current block of the currentpicture.

FIG. 6 is a diagram illustrating an example of an intra block copyingprocess, in accordance with one or more techniques of this disclosure.According to one example intra-prediction process, video encoder 20 mayselect a predictor video block, e.g., from a set of previously coded andreconstructed blocks of video data. In the example of FIG. 6,reconstructed region 108 includes the set of previously coded andreconstructed video blocks. The blocks in the reconstructed region 108may represent blocks that have been decoded and reconstructed by videodecoder 30 and stored in reconstructed region memory 92, or blocks thathave been decoded and reconstructed in the reconstruction loop of videoencoder 20 and stored in reconstructed region memory 64. Current block102 represents a current block of video data to be coded. Predictorblock 104 represents a reconstructed video block, in the same picture ascurrent block 102, which is used for Intra BC prediction of currentblock 102.

In the example intra-prediction process, video encoder 20 may determineand encode motion vector 106, which indicates the position of predictorblock 104 relative to current block 102, together with the residuesignal. For instance, as illustrated by FIG. 6, motion vector 106 mayindicate the position of the upper-left corner of predictor block 104relative to the upper-left corner of current block 102. As discussedabove, motion vector 106 may also be referred to as an offset vector,displacement vector, or block vector (BV). Video decoder 30 may utilizethe encoded information for decoding the current block.

As one illustrative example, before decoding a current picture, videodecoder 30 may initialize the reconstructed samples of the currentpicture to 1<<(bitDepth−1). Video decoder 30 may then store a version ofthe current picture in a reference picture buffer, such as referencepicture memory 82, and mark the current picture as a long-termreference. Video decoder 30 may then include the current picture in areference picture list (RPL) and assign a reference index (e.g., IdxCur(in reference list ListX)) for the current picture in the RPL.

Video decoder 30 may decode, based on the RPL, a block of video data inthe current picture based on a predictor block included in the versionof the current picture stored in reference picture memory 82. In otherwords, when decoding a block of the current picture, video decoder 30may predict the block from the current picture, namely the referencewith reference index IdxCur (in ListX). In this case, video decoder 30may utilize the same MV coding method as that in HEVC version 1. In someexamples, video decoder 30 may not restrict the value of MV, e.g.,because the video decoder initialized the current picture with the fixedvalue. Video decoder 30 may write the reconstructed samples of the blockto the current picture buffer (e.g., reference picture memory 82) toreplace the initialized values (e.g., after the video decoder hasfinished decoding the block). Note that in this example, video decoder30 does not apply deblocking, SAO or any other filtering operation tothe reconstructed samples after decoding the block. In other words,video decoder 30 may use the current picture as a reference beforeapplying deblocking and SAO.

After coding the whole picture, video decoder 30 may apply deblocking,SAO and other operations such as picture marking in the same way asthose described in HEVC version 1. In some examples, video decoder 30may keep the precision of MV the same as conventional reference pictures(e.g., quarter-pixel precision) when referencing to a block in thecurrent picture. In such examples, video decoder 30 may use theinterpolation filter defined in HEVC version 1. In some examples, videodecoder 30 may use (in addition to or in place of the interpolationfilter defined in HEVC version 1) other interpolation filters, such asbi-linear interpolation filter. In some examples, such as when a MV isreferencing to a block in the current picture, video decoder 30 mayrestrict the precision of MV to integer-pixel. In some examples, videodecoder 30 may perform one or more reference picture managementtechniques involving the current picture, as described above.

As discussed above, in some examples, video encoder 20 may encode one ormore syntax elements to indicate whether a current picture may bepresent in an RPL used to predict the current picture signal the syntaxelement. For instance, video decoder 30 may signalcurr_pic_as_ref_enabled_flag to indicate to video decoder 30 whether ornot a picture referring to the PPS may be present in a reference picturelist of the picture itself. As one example, video encoder 20 may signalcurr_pic_as_ref_enabled_flag as equal to 1 to indicate that a picturereferring to the PPS may be present in a reference picture list of thepicture itself. As another example, video encoder 20 may signalcurr_pic_as_ref_enabled_flag as equal to 0 to indicate that a picturereferring to the PPS is not present in a reference picture list of thepicture itself. As yet another example, video encoder 20 may not signalcurr_pic_as_ref_enabled_flag. In some example, when the syntax elementcurr_pic_as_ref_enabled_flag is not present, video decoder 30 may infer(i.e., may determine without an explicit indication or signal) the valueof curr_pic_as_ref_enabled_flag to be equal to 0. In some examples,video encoder 20 may set a variable NumAddRefPic equal to(curr_pic_as_ref_enabled_flag ? 1:0). In the table below,curr_pic_as_ref_enabled is shown in italicized text, to indicate thatthis syntax element is being added to the picture parameter set. Inother examples, this syntax element may be added, additionally oralternatively, to other data structures, e.g., a sequence parameter set(SPS), a video parameter set (VPS), a slice header, or the like.

De- scrip- tor pic_parameter_set_rbsp( ) { pps_pic_parameter_set_idue(v) pps_seq_parameter_set_id ue(v)dependent_slice_segments_enabled_flag u(1) output_flag_present_flag u(1)num_extra_slice_header_bits u(3) sign_data_hiding_enabled_flag u(1)cabac_init_present_flag u(1) num_ref_idx_l0_default_active_minus1 ue(v)num_ref_idx_l1_default_active_minus1 ue(v) init_qp_minus26 se(v)constrained_intra_pred_flag u(1) transform_skip_enabled_flag u(1)cu_qp_delta_enabled_flag u(1) if( cu_qp_delta_enabled_flag )diff_cu_qp_delta_depth ue(v) pps_cb_qp_offset se(v) pps_cr_qp_offsetse(v) pps_slice_chroma_qp_offsets_present_flag u(1) weighted_pred_flagu(1) weighted_bipred_flag u(1) transquant_bypass_enabled_flag u(1)tiles_enabled_flag u(1) entropy_coding_sync_enabled_flag u(1) if(tiles_enabled_flag ) { num_tile_columns_minus1 ue(v)num_tile_rows_minus1 ue(v) uniform_spacing_flag u(1) if(!uniform_spacing_flag ) { for( i = 0; i < num_tile_columns_minus1; i++ )column_width_minus1[ i ] ue(v) for( i = 0; i < num_tile_rows_minus1; i++) row_height_minus1[ i ] ue(v) } loop_filter_across_tiles_enabled_flagu(1) } pps_loop_filter_across_slices_enabled_flag u(1)deblocking_filter_control_present_flag u(1) if(deblocking_filter_control_present_flag ) {deblocking_filter_override_enabled_flag u(1)pps_deblocking_filter_disabled_flag u(1) if(!pps_deblocking_filter_disabled_flag ) { pps_beta_offset_div2 se(v)pps_tc_offset_div2 se(v) } } pps_scaling_list_data_present_flag u(1) if(pps_scaling_list_data_present_flag ) scaling_list_data( )lists_modification_present_flag u(1) log2_parallel_merge_level_minus2ue(v) slice_segment_header_extension_present_flag u(1)pps_extension_present_flag u(1) if( pps_extension_present_flag ) { for(i = 0; i < 1; i++ ) pps_extension_flag[ i ] u(1) pps_extension_7bitsu(7) } if( pps_extension_flag[ 0 ] ) { if( transform_skip_enabled_flag )log2_max_transform_skip_block_size_minus2 ue(v)cross_component_prediction_enabled_flag u(1)chroma_qp_adjustment_enabled_flag u(1) if(chroma_qp_adjustment_enabled_flag ) { diff_cu_chroma_qp_adjustment_depthue(v) chroma_qp_adjustment_table_size_minus1 ue(v) for( i = 0; i <=chroma_qp_adjustment_table_size_minus1; i++ ) { cb_qp_adjustment[ i ]se(v) cr_qp_adjustment[ i ] se(v) } } log2_sao_offset_scale_luma ue(v)log2_sao_offset_scale_chroma ue(v) curr_pic_as_ref_enabled_flag u(1) }if( pps_extension_7bits ) while( more_rbsp_data( ) )pps_extension_data_flag u(1) rbsp_trailing_bits( ) }

As discussed above, video decoder 30 may construct one or more referencepicture lists that may include the current picture. For instance, insome examples, video decoder 30 may invoke the following process at thebeginning of the decoding process for each inter coded slice. In someexamples, such as when decoding a P slice, video decoder 30 mayconstruct a single reference picture list RefPicList0. In some examples,such as when decoding a B slice, video decoder 30 may further constructa second independent reference picture list RefPicList1 in addition toRefPicList0.

At the beginning of the decoding process for each slice, video decoder30 may derive the reference picture lists RefPicList0 and, for B slices,RefPicList1 as follows (where italicized text represents additionsrelative to the current semantics of the standard):

Video decoder 30 may set the variable NumRpsCurrTempList0 as equal toMax(num_ref_idx_10_active_minus1+1, NumPocTotalCurr+NumAddRefPic) andconstruct the list RefPicListTemp0 as follows, where currPic is thecurrent picture:

rIdx = 0 while( rIdx < NumRpsCurrTempList0 ) { for( i = 0; i <NumPocStCurrBefore && rIdx <  NumRpsCurrTempList0; rIdx++, i++ )RefPicListTemp0[ rIdx ] = RefPicSetStCurrBefore[ i ] if(curr_pic_as_ref_enabled_flag ) RefPicListTemp0[ rIdx ] = currPic for( i= 0; i < NumPocStCurrAfter && rIdx < NumRpsCurrTempList0; rIdx++, i++ )RefPicListTemp0[ rIdx ] = RefPicSetStCurrAfter[ i ] for( i = 0; i <NumPocLtCurr && rIdx < NumRpsCurrTempList0; rIdx++, i++ )RefPicListTemp0[ rIdx ] = RefPicSetLtCurr[ i ] }

Video decoder 30 may construct the list RefPicList0 as follows, wherecurrPic is the current picture:

for( rIdx = 0; rIdx <= num_ref_idx_l0_active_minus1; rIdx++)RefPicList0[ rIdx ] = ref_pic_list_modification_flag_l0 ?RefPicListTemp0[ list_entry_l0[ rIdx ] ] : RefPicListTemp0 [ rIdx ]

In some examples, such as when the slice is a B slice, video decoder 30may set the variable NumRpsCurrTempList1 as equal toMax(num_ref_idx_11_active_minus1+1, NumPocTotalCurr+NumAddRefPic) andconstruct the list RefPicListTemp1 as follows:

rIdx = 0 while( rIdx < NumRpsCurrTempList1 ) { for( i = 0; i <NumPocStCurrAfter && rIdx < NumRpsCurrTempList1; rIdx++, i++ )RefPicListTemp1[ rIdx ] = RefPicSetStCurrAfter[ i ] if(curr_pic_as_ref_enabled_flag ) RefPicListTemp0[ rIdx ] = currPic for( i= 0; i < NumPocStCurrBefore && rIdx < NumRpsCurrTempList1; rIdx++, i++ )RefPicListTemp1[ rIdx ] = RefPicSetStCurrBefore[ i ] for( i = 0; i <NumPocLtCurr && rIdx < NumRpsCurrTempList1; rIdx++, i++ )RefPicListTemp1[ rIdx ] = RefPicSetLtCurr[ i ] }

In some examples, such as when the slice is a B slice, video decoder 30may construct the list RefPicList1 as follows:

for( rIdx = 0; rIdx <= num_ref_idx_l1_active minus1; rIdx++)RefPicList1[ rIdx ] = ref_pic_list_modification_flag_l1 ?RefPicListTemp1[ list_entry_l1[ rIdx ] ] : RefPicListTemp1 [ rIdx ]

FIG. 7 is a flow diagram illustrating example operations of a videoencoder to encode a block of video data of a picture based on apredictor block included in the same picture, in accordance with one ormore techniques of the present disclosure. The techniques of FIG. 7 maybe performed by one or more video encoders, such as video encoder 20illustrated in FIGS. 1 and 3. For purposes of illustration, thetechniques of FIG. 7 are described within the context of video encoder20, although video encoders having configurations different than that ofvideo encoder 20 may perform the techniques of FIG. 7.

In accordance with one or more techniques of this disclosure, videoencoder 20 may store, in a reference picture buffer, a version of acurrent picture of video data (702). For instance, prediction processingunit 42 may store an initialized version of the current picture inreference picture memory 64.

Video encoder 20 may select a current block (704), and determine aprediction mode for the current block (706). Video encoder 20 may selectthe prediction mode from among a variety of different modes, which maybe tested using, e.g., BD-rate, and video encoder 20 may select the modethat yields the best BD-rate performance. In the example of FIG. 7,video encoder 20 determine to encode the current block using Intra BC.

Video encoder 20 may determine a predictor block for the current block(708). For instance, video encoder 20 may determine the prediction blockas a block in the current picture found to closely match the currentblock, in terms of pixel difference, which may be determined by sum ofabsolute difference (SAD), sum of square difference (SSD), or otherdifference metrics.

Video encoder 20 may insert the current picture in a reference picturelist (RPL) used to predict the current picture (710). In some examples,video encoder 20 may encode a syntax element that indicates whetherpictures of the video data may be present in RPLs used to predictthemselves (e.g., curr_pic_as_ref_enabled_flag). As discussed above, insome examples, video encoder 20 may insert the current picture in theRPL with: an index value less than index values of pictures in along-term RPS, an index value greater than index values of pictures in along-term RPS, or a fixed index value. In some examples, video encoder20 may construct the RPL used to predict the current picture such thatthe RPL used to predict the current picture only includes the currentpicture. For instance, where the current block is included in a currentintra slice (e.g., an I-slice), video encoder 20 may construct the RPLused to predict blocks of the current intra slice such that the RPL usedto predict the blocks of the current intra slice only includes thecurrent picture. In some examples, video encoder 20 may construct theRPL used to predict the current picture such that the RPL used topredict the current picture includes the current picture and one or moreother pictures of video data. For instance, where the current block isincluded in a current inter slice (e.g., a B-slice or a P-slice), videoencoder 20 may construct the RPL used to predict blocks of the currentinter slice such that the RPL used to predict the blocks of the currentintra slice includes the current picture and one or more other picturesof video data.

Video encoder 20 may determine an index of the current picture in theRPL (712). For instance, where the current picture is inserted into theRPL with a fixed index value, video encoder 20 may determine that theindex of the current picture in the RPL is the fixed index value.

Video encoder 20 may calculate a residual block for the current block(714). For instance, summer 50 may subtract samples of the current blockfrom samples of the determined predictor block to calculate the residualblock.

Video encoder 20 may quantize and transform the residual block (716).For instance, transform processing unit 52 of video encoder 20 may applya transform, such as a discrete cosine transform (DCT) or a conceptuallysimilar transform, to the residual block, producing a video blockcomprising residual transform coefficient values. Quantizationprocessing unit 54 of video encoder 20 may quantize the transformcoefficients to further reduce bit rate.

Video encoder 20 may entropy encode the prediction mode, the index, andquantized transform coefficients (718). For instance, entropy encodingunit 56 may entropy encode the prediction mode of the current block, theindex of the reference picture for the current block (that may be theindex of the current block in the RPL), and the quantized transformcoefficients. In this way, video encoder 20 may perform Intra BC.

In some examples, video encoder 20 may perform the example operations inthe order illustrated in FIG. 7. In some examples, video encoder 20 mayperform the example operations in an order other than the orderillustrated in FIG. 7. For instance, in some examples, video encoder 20may insert the current picture in the RPL used to predict the currentpicture (710) before selecting the current block from the currentpicture (704). For example, where the current block is included in acurrent slice, video encoder 20 may may insert the current picture inthe RPL used to predict the current picture before encoding any blocksof the current slice.

FIG. 8 is a flow diagram illustrating example operations of a videodecoder to decode a block of video data of a picture based on apredictor block included in the same picture, in accordance with one ormore techniques of the present disclosure. The techniques of FIG. 8 maybe performed by one or more video decoders, such as video decoder 30illustrated in FIGS. 1 and 5. For purposes of illustration, thetechniques of FIG. 8 are described within the context of video decoder30, although video decoders having configurations different than that ofvideo decoder 30 may perform the techniques of FIG. 8.

In accordance with one or more techniques of this disclosure, videodecoder 30 may store, in a reference picture buffer, a version of acurrent picture of video data (802). For instance, prediction processingunit 71 may store an initialized version of the current picture inreference picture memory 82.

Video decoder 30 may select a current block from the current picture(804), and entropy decode a prediction mode, an index of a referencepicture, and quantized transform coefficients for the current block(806). For instance, entropy decoding unit 70 may entropy one or moresyntax elements that indicate that the prediction mode for the currentblock is Intra BC and the index of a reference picture used to predictthe current block (e.g., ref_idx_lX). In the example of FIG. 8, thereference picture used to predict the current block may be the currentpicture.

Video decoder 30 may insert the current picture in a reference picturelist (RPL) used to predict the current picture (808). In some examples,video decoder 30 may determine whether to insert the current picture inthe RPL based on the presence/value of one or more syntax elements. Forinstance, video decoder 30 may determine whether to insert the currentpicture in the RPL based on a value of a syntax element that indicateswhether pictures of the video data may be present in RPLs used topredict themselves (e.g., curr_pic_as_ref_enabled_flag). As discussedabove, in some examples, video decoder 30 may insert the current picturein the RPL with: an index value less than index values of pictures in along-term RPS, an index value greater than index values of pictures in along-term RPS, or a fixed index value. In some examples, video decoder30 may constructing the RPL used to predict the current picture suchthat the RPL used to predict the current picture only includes thecurrent picture. In some examples, video decoder 30 may construct theRPL used to predict the current picture such that the RPL used topredict the current picture includes the current picture and one or moreother pictures of video data.

Video decoder 30 may determine a predictor block for the current block(810). For instance, prediction processing unit 71 may determine thepredictor block for the current block based on the index of thereference picture, which may refer to the index of the current picturein the RPL, and a motion vector that indicates a displacement betweenthe current block and the predictor block.

Video decoder 30 may inverse-quantize and inverse-transform the residualblock (812). For instance, inverse quantization processing unit 76 mayinverse quantize, i.e., de-quantizes, the quantized transformcoefficients decoded by entropy decoding unit 70. Inverse transformprocessing unit 78 may apply an inverse transform, e.g., an inverse DCT,an inverse integer transform, or a conceptually similar inversetransform process, to the transform coefficients in order to produceresidual blocks in the pixel domain.

Video decoder 30 may reconstruct the current block (814). For instance,summer 80 may add the residual block to the predictor block toreconstruct the current block. Video decoder 30 may update, afterreconstrucing the current block, the version of the current picture inthe reference picture buffer with an updated version of the currentpicture that included the coded current block. For instance, summer 80may store the reconstructed samples of the current block in referencepicture memory 82, e.g., to enable a subsequent block to use one or morereconstructed samples of the current block as some or all of a predictorblock. In this way, video decoder 30 may perform Intra BC.

In some examples, video decoder 30 may perform the example operations inthe order illustrated in FIG. 8. In some examples, video decoder 30 mayperform the example operations in an order other than the orderillustrated in FIG. 8. For instance, in some examples, video decoder 30may insert the current picture in the RPL used to predict the currentpicture (808) before selecting the current block from the currentpicture (804). For example, where the current block is included in acurrent slice, video decoder 30 may may insert the current picture inthe RPL used to predict the current picture before encoding any blocksof the current slice.

The following numbered examples may illustrate one or more aspects ofthe disclosure:

1. A method of encoding or decoding video data, the method comprising:storing, by a video coder and in a reference picture buffer, a versionof a current picture of the video data; inserting an indication of thecurrent picture in a reference picture list (RPL) used during predictionof blocks of the current picture; and coding, by the video coder andbased on the RPL, a first block of video data in the current picturebased on a predictor block of video data included in the version of thecurrent picture stored in the reference picture buffer.

2. The method of claim 1, further comprising: updating, by the videocoder and after coding the first block, the version of the currentpicture in the reference picture buffer with an updated version of thecurrent picture that includes the coded first block; and coding, by thevideo coder and based on the RPL, a second block of video data in thecurrent picture based on a predictor block included in the updatedversion of the current picture stored in the reference picture buffer.

3. The method of claim 1, further comprising: coding, by the videocoder, a syntax element that indicates whether pictures of the videodata may be present in RPLs used to predict the pictures themselves; anddetermining to include the current picture of the video data in the RPLused to predict the current picture based on the syntax element.

4. The method of claim 3, wherein coding the syntax element comprisescoding the syntax element in a video parameter set (VPS) referred to bythe current picture, a sequence parameter set (SPS) referred to by thecurrent picture, or a picture parameter set (PPS) referred to by thecurrent picture.

5. The method of claim 4, wherein the syntax element is a first syntaxelement and the first block is included in a current slice of thecurrent picture, the method further comprising: coding, by the videocoder and based on the first syntax element indicating that pictures ofthe video data may be present in RPLs used to predict the picturesthemselves, a second syntax element that indicates whether the currentpicture of the video data may be present in the RPL used to predict thecurrent slice, wherein the second syntax element is included in a headerof the current slice, wherein the determination to insert the currentpicture of the video data in the RPL used to predict the current pictureis further based on the second syntax element.

6. The method of claim 5, wherein coding the second syntax elementcomprises coding the second syntax element in a header of the currentslice before other syntax elements related to modifying the RPL used topredict the current slice.

7. The method of claim 4, wherein the method does not include coding asyntax element that indicates whether the first block is coded usingIntra Block Copy (Intra BC).

8. The method of claim 1, wherein the block is included in a currentslice of the current picture, and wherein a syntax element indicating acollocated reference index for the current slice indicates a picturethat is not the current picture.

9. The method of claim 1, wherein the block is included in a currentslice of the current picture, and wherein the predictor block isincluded in the current slice.

10. The method of claim 1, wherein each entry in the RPL has an indexvalue, wherein inserting the current picture in the RPL used to predictthe current picture comprises constructing the RPL used to predict thecurrent picture based on one or more reference picture sets (RPSs) by atleast: inserting the current picture in the RPL with an index value lessthan index values of pictures in a long-term RPS; inserting the currentpicture in the RPL with an index value greater than index values ofpictures in a long-term RPS; or inserting the current picture in the RPLwith a fixed index value.

11. The method of claim 1, wherein the block is included in a currentslice of the current picture, wherein the current slice is an intraslice, and wherein inserting the current picture in the RPL used topredict the current picture comprises constructing the RPL used topredict the current picture such that the RPL used to predict thecurrent picture only includes the current picture.

12. The method of claim 1, wherein the block is included in a currentslice of the current picture, wherein the current slice is an interslice, and wherein inserting the current picture in the RPL used topredict the current picture comprises constructing the RPL used topredict the current picture such that the RPL used to predict thecurrent picture includes the current picture and one or more otherpictures of video data.

13. The method of claim 1, further comprising: marking, by the videocoder and before coding the block of the current picture, the currentpicture of the video data as a long-term reference picture; and marking,by the video coder and after coding the block of the current picture,the current picture of the video data as a short-term reference picture.

14. The method of claim 1, wherein coding the block comprises encodingthe block, the method further comprising encoding, in an encoded videobitstream, a representation of a vector that represents a displacementbetween the block of video data and the predictor block of video data.

15. The method of claim 1, wherein coding the block comprises decodingthe block, the method further comprising determining, based on anencoded video bitstream, a vector that represents a displacement betweenthe block of video data and the predictor block of video data.

16. The method of claim 1, wherein storing the version of the currentpicture in the reference picture buffer comprises: storing, by the videocoder and in the reference picture buffer, a version of the currentpicture with sample pixel values initialized to a fixed value.

17. A device for encoding or decoding video data, the device comprising:a reference picture buffer configured to store one or more pictures ofthe video data; and one or more processors configured to perform themethod of any combination of examples b 1-16.

18. A device for encoding or decoding video data, the device comprisingmeans for performing the method of any combination of examples 1-16.

19. A computer-readable storage medium storing instructions that, whenexecuted, cause one or more processors of a video coder to perform themethod of any combination of examples 1-16.

Certain aspects of this disclosure have been described with respect tothe HEVC standard for purposes of illustration. However, the techniquesdescribed in this disclosure may be useful for other video codingprocesses, including other standard or proprietary video codingprocesses not yet developed, such as the H.266 video coding standardcurrently in development.

A video coder, as described in this disclosure, may refer to a videoencoder or a video decoder. Similarly, a video coding unit may refer toa video encoder or a video decoder. Likewise, video coding may refer tovideo encoding or video decoding, as applicable.

It is to be recognized that depending on the example, certain acts orevents of any of the techniques described herein can be performed in adifferent sequence, may be added, merged, or left out altogether (e.g.,not all described acts or events are necessary for the practice of thetechniques). Moreover, in certain examples, acts or events may beperformed concurrently, e.g., through multi-threaded processing,interrupt processing, or multiple processors, rather than sequentially.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol.

In this manner, computer-readable media generally may correspond to (1)tangible computer-readable storage media which is non-transitory or (2)a communication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium.

It should be understood, however, that computer-readable storage mediaand data storage media do not include connections, carrier waves,signals, or other transient media, but are instead directed tonon-transient, tangible storage media. Disk and disc, as used herein,includes compact disc (CD), laser disc, optical disc, digital versatiledisc (DVD), floppy disk and Blu-ray disc, where disks usually reproducedata magnetically, while discs reproduce data optically with lasers.Combinations of the above should also be included within the scope ofcomputer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method of decoding video data, the methodcomprising: storing, by a video decoder and in a buffer, a set ofreconstructed blocks of a current picture of the video data; decoding,by a video decoder, a syntax element indicating that a current block ofthe current picture of the video data is to be predicted from thecurrent picture; based on the syntax element indicating that the currentblock of the current picture is to be predicted from the currentpicture, setting a reference index value to a fixed value that indicatesthat the current picture is a reference picture for the current block;determining, for the current block, a position of a reference block inthe current picture, the reference block being a block among the set ofreconstructed blocks of the current picture; forming a predictor blockfrom the reference block among the set of reconstructed blocks of thecurrent picture stored in the buffer; and reconstructing, by the videodecoder, pixel values of the current block of video data in the currentpicture based on a sum of residual pixel data and pixel values of thepredictor block formed from the reference block among the set ofreconstructed blocks of the current picture of video data.
 2. The methodof claim 1, wherein setting the reference index value to the fixed valuecomprises setting the reference index value to −1.
 3. The method ofclaim 1, wherein determining the position of the reference blockcomprises restricting a motion vector that represents a displacementbetween the current block of video data and the predictor block of videodata to be an integer value.
 4. The method of claim 1, wherein thesyntax element indicating that the current block of the current pictureof the video data is to be predicted from the current picture is a firstsyntax element, the method further comprising: decoding a second syntaxelement indicating whether or not blocks of the current picture of thevideo data are allowed to be predicted from the current picture.
 5. Themethod of claim 4, wherein decoding the second syntax element comprises:decoding, by the video decoder and in a header of the current picture,the second syntax element.
 6. The method of claim 4, wherein decodingthe first syntax element comprises: decoding, responsive to the secondsyntax element indicating that blocks of the current picture of thevideo data are allowed to be predicted from the current picture, thefirst syntax element.
 7. A device for decoding video data, the devicecomprising: a buffer; and one or more processors implemented incircuitry and configured to: store, in the buffer, a set ofreconstructed blocks of a current picture of the video data; decode asyntax element indicating that a current block of the current picture ofthe video data is to be predicted from the current picture; set, basedon the syntax element indicating that the current block of the currentpicture is to be predicted from the current picture, a reference indexvalue to a fixed value that indicates that the current picture is areference picture for the current block; determine, for the currentblock, a position of a reference block in the current picture, thereference block being a block among the set of reconstructed blocks ofthe current picture; form a predictor block from the reference blockamong the set of reconstructed blocks of the current picture stored inthe buffer; and reconstruct pixel values of the current block of videodata in the current picture based on a sum of residual pixel data andpixel values of the predictor block formed from the reference blockamong the set of reconstructed blocks of the current picture of videodata.
 8. The device of claim 7, wherein, to set the reference indexvalue to the fixed value, the one or more processors are configured toset the reference index value to −1.
 9. The device of claim 7, wherein,to determine the position of the reference block, the one or moreprocessors are configured to restrict a motion vector that represents adisplacement between the current block of video data and the predictorblock of video data to be an integer value.
 10. The device of claim 7,wherein the syntax element indicating that the current block of thecurrent picture of the video data is to be predicted from the currentpicture is a first syntax element, and wherein the one or moreprocessors are further configured to: decode a second syntax elementindicating whether or not blocks of the current picture of the videodata are allowed to be predicted from the current picture.
 11. Thedevice of claim 10, wherein, to decode the second syntax element, theone or more processors are configured to: decode, from a header of thecurrent picture, the second syntax element.
 12. The device of claim 10,wherein, to decode the first syntax element, the one or more processorsare configured to: decode, responsive to the second syntax elementindicating that blocks of the current picture of the video data areallowed to be predicted from the current picture, the first syntaxelement.
 13. A device for decoding video data, the device comprising:means for storing, in a buffer, a set of reconstructed blocks of acurrent picture of the video data; means for decoding a syntax elementindicating that a current block of the current picture of the video datais to be predicted from the current picture; means for setting, based onthe syntax element indicating that the current block of the currentpicture is to be predicted from the current picture, a reference indexvalue to a fixed value that indicates that the current picture is areference picture for the current block; means for determining, for thecurrent block, a position of a reference block in the current picture,the reference block being a block among the set of reconstructed blocksof the current picture; means for forming a predictor block from thereference block among the set of reconstructed blocks of the currentpicture stored in the buffer; and means for reconstructing pixel valuesof the current block of video data in the current picture based on a sumof residual pixel data and pixel values of the predictor block formedfrom the reference block among the set of reconstructed blocks of thecurrent picture of video data.
 14. The device of claim 13, wherein themeans setting the reference index value to the fixed value comprisemeans for setting the reference index value to −1.
 15. The device ofclaim 13, wherein the means for determining the position of thereference block comprise means for restricting a motion vector thatrepresents a displacement between the current block of video data andthe predictor block of video data to be an integer value.
 16. The deviceof claim 13, wherein the syntax element indicating that the currentblock of the current picture of the video data is to be predicted fromthe current picture is a first syntax element, the device furthercomprising: means for decoding a second syntax element indicatingwhether or not blocks of the current picture of the video data areallowed to be predicted from the current picture.
 17. The device ofclaim 16, wherein the means for decoding the second syntax elementcomprise means for decoding, from a header of the current picture, thesecond syntax element.
 18. The device of claim 16, wherein the means fordecoding the first syntax element comprise means for decoding,responsive to the second syntax element indicating that blocks of thecurrent picture of the video data are allowed to be predicted from thecurrent picture, the first syntax element.
 19. A computer-readablestorage medium storing instructions that, when executed, cause one ormore processors of a video decoder to: store, in a buffer, a set ofreconstructed blocks of a current picture of the video data; decode asyntax element indicating that a current block of the current picture ofthe video data is to be predicted from the current picture; set, basedon the syntax element indicating that the current block of the currentpicture is to be predicted from the current picture, a reference indexvalue to a fixed value that indicates that the current picture is areference picture for the current block; determine, for the currentblock, a position of a reference block in the current picture, thereference block being a block among the set of reconstructed blocks ofthe current picture; form a predictor block from the reference blockamong the set of reconstructed blocks of the current picture stored inthe buffer; and reconstruct pixel values of the current block of videodata in the current picture based on a sum of residual pixel data andpixel values of the predictor block formed from the reference blockamong the set of reconstructed blocks of the current picture of videodata.
 20. The computer-readable storage medium of claim 19, wherein theinstructions that cause the one or more processors to set the referenceindex value to the fixed value comprise instructions that cause the oneor more processors to set the reference index value to −1.
 21. Thecomputer-readable storage medium of claim 19, wherein the instructionsthat cause the one or more processors to determine the position of thereference block comprise instructions that cause the one or moreprocessors to restrict a motion vector that represents a displacementbetween the current block of video data and the predictor block of videodata to be an integer value.
 22. The computer-readable storage medium ofclaim 19, wherein the syntax element indicating that the current blockof the current picture of the video data is to be predicted from thecurrent picture is a first syntax element, and further comprisinginstructions that cause the one or more processors to: decode a secondsyntax element indicating whether or not blocks of the current pictureof the video data are allowed to be predicted from the current picture.23. The computer-readable storage medium of claim 22, wherein theinstructions that cause the one or more processors to decode the secondsyntax element comprise instructions that cause the one or moreprocessors to: decode, from a header of the current picture, the secondsyntax element.
 24. The computer-readable storage medium of claim 22,wherein the instructions that cause the one or more processors to decodethe first syntax element comprise instructions that cause the one ormore processors to: decode, responsive to the second syntax elementindicating that blocks of the current picture of the video data areallowed to be predicted from the current picture, the first syntaxelement.
 25. A method of decoding video data, the method comprising:storing, by a video decoder and in a buffer, a set of reconstructedblocks of a current picture of the video data; determining, for thecurrent block of the current picture a reference picture list indexvalue into a reference picture list, which includes the current pictureand at least one other picture and in which the current picture has afixed index value; when the reference picture list index valuedetermined for the current block has the fixed index value, determining,for the current block, a position of a reference block in the currentpicture, the reference block being a block among the set ofreconstructed blocks of the current picture; forming a predictor blockfrom the reference block among the set of reconstructed blocks of thecurrent picture stored in the buffer; and reconstructing, by the videodecoder, the current block of the video data based on the predictorblock.
 26. The method of claim 25, wherein the fixed value is -1. 27.The method of claim 25, wherein determining the position of thereference block comprises restricting a motion vector that represents adisplacement between the current block of video data and the predictorblock of video data to be an integer value.
 28. The method of claim 25,further comprising: decoding, by the video decoder, a syntax elementindicating that a current block of the current picture of the video datais to be predicted from the current picture; and setting, based on thesyntax element indicating that the current block of the current pictureis to be predicted from the current picture, the reference picture listindex value to the fixed index value that indicates that the currentpicture is a reference picture for the current block.
 29. The method ofclaim 28, wherein the syntax element indicating that the current blockof the current picture of the video data is to be predicted from thecurrent picture is a first syntax element, the method furthercomprising: decoding a second syntax element indicating whether or notblocks of the current picture of the video data are allowed to bepredicted from the current picture.
 30. The method of claim 25, themethod further comprising: decoding, by the video decoder, a firstsyntax element indicating that the current block of the current pictureof the video data is to be predicted from the current picture; anddecoding a second syntax element indicating whether or not blocks of thecurrent picture of the video data are allowed to be predicted from thecurrent picture.
 31. The method of claim 29, wherein decoding the secondsyntax element comprises: decoding, by the video decoder and in a headerof the current picture, the second syntax element.
 32. The method ofclaim 30, wherein decoding the second syntax element comprises:decoding, by the video decoder and in a header of the current picture,the second syntax element.
 33. The method of claim 29, wherein decodingthe first syntax element comprises: decoding, responsive to the secondsyntax element indicating that blocks of the current picture of thevideo data are allowed to be predicted from the current picture, thefirst syntax element.
 34. The method of claim 30, wherein decoding thefirst syntax element comprises: decoding, responsive to the secondsyntax element indicating that blocks of the current picture of thevideo data are allowed to be predicted from the current picture, thefirst syntax element.
 35. A device for decoding video data, the devicecomprising: a buffer; and one or more processors implemented incircuitry and configured to: store, in the buffer, a set ofreconstructed blocks of a current picture of the video data; determine,for the current block of the current picture a reference picture listindex value into a reference picture list, which includes the currentpicture and at least one other picture and in which the current picturehas a fixed index value; based on the reference picture list index valuedetermined for the current block having the fixed index value,determine, for the current block, a position of a reference block in thecurrent picture, the reference block being a block among the set ofreconstructed blocks of the current picture; form a predictor block fromthe reference block among the set of reconstructed blocks of the currentpicture stored in the buffer; and reconstruct the current block of thevideo data based on the predictor block.
 36. The device of claim 35,wherein the fixed value is -1.
 37. The device of claim 35, wherein theone or more processors is further configured to restrict a motion vectorthat represents a displacement between the current block of video dataand the predictor block of video data to be an integer value.
 38. Thedevice of claim 35, wherein the one or more processors is furtherconfigured to decode a syntax element indicating that a current block ofthe current picture of the video data is to be predicted from thecurrent picture; and set, based on the syntax element indicating thatthe current block of the current picture is to be predicted from thecurrent picture, the reference picture list index value to the fixedindex value that indicates that the current picture is a referencepicture for the current block.
 39. The device of claim 38, wherein thesyntax element indicating that the current block of the current pictureof the video data is to be predicted from the current picture is a firstsyntax element and wherein the one or more processors is furtherconfigured to decode a second syntax element indicating whether or notblocks of the current picture of the video data are allowed to bepredicted from the current picture.
 40. The device of claim 35, whereinthe one or more processors is further configured to: decode a firstsyntax element indicating that the current block of the current pictureof the video data is to be predicted from the current picture; anddecode a second syntax element indicating whether or not blocks of thecurrent picture of the video data are allowed to be predicted from thecurrent picture.
 41. The device of claim 39, wherein the one or moreprocessors is further configured to decode, from within a header of thecurrent picture, the second syntax element.
 42. The device of claim 41,wherein the one or more processors is further configured to decode, fromwithin a header of the current picture, the second syntax element. 43.The device of claim 39, wherein the one or more processors is furtherconfigured to decode, responsive to the second syntax element indicatingthat blocks of the current picture of the video data are allowed to bepredicted from the current picture, the first syntax element.
 44. Thedevice of claim 40, wherein the one or more processors is furtherconfigured to decode, responsive to the second syntax element indicatingthat blocks of the current picture of the video data are allowed to bepredicted from the current picture, the first syntax element.